Hello!
I have an orb, where I do something like this:
version: 2.1
description: My orb
commands:
install-something:
description: Install
parameters:
tool-revision:
type: string
description: Revision of tool to use
default: \"\"
steps:
- run: "wget https://example.com"
- when:
condition: <<parameters.tool-revision>>
steps:
- run: echo HERE
- unless:
condition: <<parameters.tool-revision>>
steps:
- run: echo THERE
Whenever I call the orb command without setting the parameter I always end up in ECHO HERE
.
The documentation states that it should behave differently:
- https://circleci.com/docs/2.0/configuration-reference/#the-when-step-requires-version-21
- https://circleci.com/docs/2.0/reusing-config/#defining-conditional-steps
Second link states:
You may use parameters as your conditions. The empty string will resolve as falsey in
when
conditions.
Edit: Also ~
or ""
as default values does not make any difference.