You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
debugging output of the command easier (it's clear with which env the command was ran).
make it easier to copy/paste the preview, and rerun that specific command manually.
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:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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