bolt icon indicating copy to clipboard operation
bolt copied to clipboard

Spaces in certain env vars will break bolt invocations

Open donoghuc opened this issue 2 years ago • 1 comments

Describe the Bug

Spaces in some environment variables overrriden in bolt's wrapper script cause bolt invocations to fail.

Expected Behavior

If my gem env vars are messed up, bolt should still be able to run.

Steps to Reproduce

[root@biggest-cherry ~]# GEM_PATH='/something/ with/ a /space' bolt command run whoami -t localhost
env: with/: No such file or directory

Suggested Fix

Escape the env vars in https://github.com/puppetlabs/bolt-vanagon/blob/main/resources/files/posix/bolt_env_wrapper#L15-L21 (for example BOLT_ORIG_GEM_PATH="$GEM_PATH"

donoghuc avatar Jan 18 '23 19:01 donoghuc

https://github.com/puppetlabs/bolt-vanagon/pull/196

donoghuc avatar Jan 18 '23 19:01 donoghuc