Conditional string feature but with inverse logic?

This is currently possible:

foo_command:
  parameters:
    foo:
      type: boolean
    steps:
      - run: <<# foo>>show me if foo is true<</ foo>

But what about:

foo_command:
  parameters:
    foo:
      type: boolean
    steps:
      - run: <<# foo>>show me if foo is FALSE<</ foo>

?

Also what is this feature called and where can I find more docs about it? (I’ve only seeing it mentioned in passing or tiny code snippets).

Thanks!

Hi there. I’m being told you should be able to negate it in the form of <<# ^foo>>

That would be great! I tried both:

<<# ^parameters.secret>>this should show<</ ^parameters.secret>>
<<# ^parameters.secret>>this should show<</ parameters.secret>>

but am getting syntax errors.

Hi, @drazisil any word? Could you show a minimal working example?

The ^ is in place of the #

The full example would be

foo_command:
  parameters:
    foo:
      type: boolean
    steps:
      - run: <<^ foo>>show me if foo is FALSE<</ foo>
1 Like

Thanks @glenjamin.circleci will give that a shot

I’m sorry @jasonkuhrt, I misunderstood what I was told and gave you the wrong info before. Glen knows what’s up :slight_smile:

@drazisil All good :slight_smile:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.