Replies: 1 comment
-
For me, the lack of environment variable substitution is most painful when using the version: 3
env:
FOO: bar
tasks:
alpha:
desc: Move to $FOO
cmds:
- "mv stuff $FOO" Running In case you were wondering: Using a regular variable instead of an environment variable is not an option for my use case. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When executing a command within the task, the task prints out the preview of command right before executing it.
In that preview, the vars are resolved to their values
ssh {{.USER}}@{{.HOST}}
becomes
ssh root@foobar
but env vars, are not resolved
ssh ${USER}@${HOST}
is printed as
ssh ${USER}@${HOST}
In some use cases (where the task's own env is controlled by an external application, e.g. a CI system) it would be useful to have the command preview resolve the env vars to their actual values before printing the command about to be execute. This would make
There's also valid usecases for using the current behaviour (where env vars are not being resolved). So, it would be useful to control in some way whether the env vars should be resolved in the preview or not, e.g. via a global, or a local to the task, bool property.
I see one complication here, environment vars can be defined in many different ways:
Beta Was this translation helpful? Give feedback.
All reactions