DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
I am trying to put the expression $( [ $1 == "dev" ] && echo "true" || echo "false" ) inside a variable to use the result in various places in my config. But it does not seem to correctly resolve the "$1" since the expression always results to false regardless if calling devspace dev or not.
What did you expect to happen instead?
I expect the variable to be resolved correctly.
How can we reproduce the bug? (as minimally and precisely as possible)
What happened?
I am trying to put the expression
$( [ $1 == "dev" ] && echo "true" || echo "false" )
inside a variable to use the result in various places in my config. But it does not seem to correctly resolve the "$1" since the expression always results tofalse
regardless if callingdevspace dev
or not.What did you expect to happen instead?
I expect the variable to be resolved correctly.
How can we reproduce the bug? (as minimally and precisely as possible)
devspace print
false
You can also change the
$1 == "print"
to any string really it will always return false.My devspace.yaml:
Local Environment:
Anything else we need to know?
Nope.