Variable substitution doesn't work in `exec` commands
jacobbednarz opened this issue · 1 comments
jacobbednarz commented
One use case for this tool is to be able to run a one off command referencing the variables.
cf-vault exec test -v -- curl -sv -H "X-Auth-Key: $CLOUDFLARE_API_KEY" https://api.cloudflare.com/...
However, the variable substitution is attempting to happen before the new process is spawned resulting in the value being empty and the resulting command being:
curl -sv -H X-Auth-Key: https://api.cloudflare.com/...
jacobbednarz commented
confirmed this has been fixed somewhere between opening this and 0.0.8. the following now works
cf-vault exec [profile-name] -- echo $CLOUDFLARE_API_TOKEN