-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
Fix passing environment variables to CmdAction #175
Conversation
This exercises issue pydoit#171.
This fixes issue pydoit#171.
The "TestCmdAction.test_env" test contained a problem: the current environment should be explicitly copied, and amended with the extra environment variables to set, instead of passing in an otherwise empty environment. This caused the tests to (rightly) fail on Windows CI hosts.
thanks. please give me sometime to merge this as I will not be available next few days. |
Sure, no rush. Thanks for your time and efforts in maintaining pydoit :-) |
@@ -17,6 +23,12 @@ | |||
sys.stdout.write("out ouch") | |||
sys.stderr.write("err output on failure") | |||
sys.exit(11) | |||
# check env | |||
if len(sys.argv) == 3 and sys.argv[1]=='check' and sys.argv[2]=='env': | |||
if os.environ.get('GELKIPWDUZLOVSXE') == '1': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so what GELKIPWDUZLOVSXE
means? 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a random string really. Although I'm sure we can come up with a backronym 😁
thanks. merged. Are you on AUTHORS file? if not please add your name there. |
Thanks, but such a tiny pull request is something I wouldn't like to call 'authoring' ;-) Once I make a more significant contribution, I'd be happy to add myself to the list. |
This should fix #171. It also includes a small test for passing environment variables to subprocesses.