-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditionally quote env vars #7071
base: master
Are you sure you want to change the base?
Conditionally quote env vars #7071
Conversation
123ac0f
to
bcb2aef
Compare
bcb2aef
to
ec0e2e1
Compare
This fix avoided some errors. However, there is still error with variable containing double quotes.
after quoting, it will become
then, in bash
will export the
which is no longer a valid JSON string. Shall we use shlex.quote() instead? |
@loadams cpu-torch-latest ci stuck, please rerun |
@saurabhkoshatwar, thanks for the PR. Is it possible to add a unit test here? |
Signed-off-by: Saurabh <[email protected]>
496fd99
to
af07f62
Compare
af07f62
to
5262524
Compare
Signed-off-by: Saurabh <[email protected]>
5262524
to
19b75eb
Compare
Thanks @saurabhkoshatwar, will review. Curious on your thoughts on @qiuosier's comment? Also can you take a look at the formatting errors? |
Signed-off-by: Saurabh Koshatwar <[email protected]>
…ar/DeepSpeed into bugfix/env_export
Resolves #6997
This PR conditionally quotes environment variable values—only wrapping those containing special characters (like parentheses) that could trigger bash errors. Safe values remain unquoted.