-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fall back to /bin/bash for the default shell path. #239
Conversation
+1 I believe this is a reasonable default until a different choice can be motivated with a use case in #226. |
@@ -59,6 +59,7 @@ def get_resultspace_environment(result_space_path, quiet=False, cached=True): | |||
# Use fallback shell if using a non-standard shell | |||
if shell_name not in ['bash', 'zsh']: | |||
shell_name = 'bash' | |||
shell_path = "/bin/bash" |
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.
Actually, specifying the default not here, but above in shell_path = os.environ.get('SHELL', '/bin/bash')
would allow to set SHELL
to something custom not ending in /bash
and still have it work (with the --norc
flag as if it were bash). With this PR, the value in SHELL
gets overwritten if it does not end in /bash
or /zsh
.
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.
This is what the other PR did initially with pjreed@4e730b3, but there were some concerns about sh
being maybe a better default. As I said I would stick with bash
until it is clear how sh
should behave.
274644c
to
97c1455
Compare
Right, makes sense— changed. @pjreed @wjwwood @jack-oquin You guys good to see this go in? |
I'm fine with it. |
I'm going to merge this and then add a check that |
Fall back to /bin/bash for the default shell path.
Fixes an issue when building in an environment without SHELL specified (such as inside debuild).