esc
esc copied to clipboard
Add option to interpolate subcommand variables without a manual sub-shell
Hello!
- Vote on this issue by adding a 👍 reaction
- If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)
Issue details
Using esc run
often requires an explicit sub-shell to execute the desired command. Here's an example:
Environment definition:
values:
environmentVariables:
ESC_ORG: You are in the ${context.pulumi.organization.login} organization!
ESC_HELLO_USER: Hello, ${context.pulumi.user.login}!
files:
DOCKER_ENVFILE: |
ESC_ORG=${environmentVariables.ESC_ORG}
ESC_HELLO_USER=${environmentVariables.ESC_HELLO_USER}
ESC command
esc run -i <your-environment-name> -- sh -c 'docker run --rm -t --env-file=$DOCKER_ENVFILE alpine env'
It would be nicer if we could write the command like this instead (notice the lack of sh -c ''
):
esc run -i <your-environment-name> -- docker run --rm -t --env-file=\$DOCKER_ENVFILE alpine env
Affected area/feature
esc run