# Conditional issue when use it as if: false

**URL:** <https://forum.buildkite.community/t/conditional-issue-when-use-it-as-if-false/859>\
**Category:** General\
**Created:** [January 9, 2020, 5:26am UTC](https://forum.buildkite.community/t/conditional-issue-when-use-it-as-if-false/859 "2020-01-09T05:26:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiaket](https://avatars.discourse-cdn.com/v4/letter/x/7feea3/32.png) [@xiaket](https://forum.buildkite.community/u/xiaket)\
**Post date:** [January 9, 2020, 5:26am UTC](https://forum.buildkite.community/t/conditional-issue-when-use-it-as-if-false/859/1 "2020-01-09T05:26:08Z")

</div>

Hi there,

In order to temporarily disable a bunch of steps in a pipeline, I tried to add a `if: false` to the pipeline but this conditional does not work as intended and steps still showed. It’s only after I’ve changed that to `if true == false` did I see the steps got disabled.

IMHO, `if: true == false` is fairly repetitive and not as clear as `if: false`. My guess here is `false` is mis-interpreted as a string and evaluated to true.

Can someone please take a look? Thanks!

Cheers,  
Kai

---

<div class="post-metadata">

**Author:** ![anon85971592](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@anon85971592](https://forum.buildkite.community/u/anon85971592)\
**Post date:** [January 9, 2020, 6:39am UTC](https://forum.buildkite.community/t/conditional-issue-when-use-it-as-if-false/859/2 "2020-01-09T06:39:50Z")

</div>

@xiaket oh! I think I may know what’s happening here. `false` may be getting translated to a literal `false`, where as our conditional gear expects it to be a string.

Out of interest, what happens when you use `if: "false"` as a string?

---

<div class="post-metadata">

**Author:** ![moensch](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/moensch/32/33_2.png) [@moensch](https://forum.buildkite.community/u/moensch)\
**Post date:** [January 9, 2020, 10:32am UTC](https://forum.buildkite.community/t/conditional-issue-when-use-it-as-if-false/859/3 "2020-01-09T10:32:14Z")

</div>

Also adding a note about the `skip: "sometrueval"` attribute to `command` steps. Obviously understand that there’s a potential issue with the lexer, but that would achieve the same (and seems clearer to the reader than `if: false`)

---

<div class="post-metadata">

**Author:** ![xiaket](https://avatars.discourse-cdn.com/v4/letter/x/7feea3/32.png) [@xiaket](https://forum.buildkite.community/u/xiaket)\
**Post date:** [January 9, 2020, 11:04am UTC](https://forum.buildkite.community/t/conditional-issue-when-use-it-as-if-false/859/4 "2020-01-09T11:04:22Z")

</div>

Thanks mate, the issue with `skip` is it is not available to `wait` and `block`, and if you don’t also skip these helper steps, it would in some cases look ugly(two waits next to each other for example) and my ACD forbid me from doing that. 😃

---

<div class="post-metadata">

**Author:** ![xiaket](https://avatars.discourse-cdn.com/v4/letter/x/7feea3/32.png) [@xiaket](https://forum.buildkite.community/u/xiaket)\
**Post date:** [January 9, 2020, 11:07am UTC](https://forum.buildkite.community/t/conditional-issue-when-use-it-as-if-false/859/5 "2020-01-09T11:07:18Z")

</div>

Yeah, thanks Keith! So as I understand, this is a bug then? Also regarding to `if: "false"`, I think it will cause a lot of confusion even it worked.
