Conversation
The idea behind using `$SHELL` when calling the temporary run.sh script (when running an update_repo command) was to make sure the temporary script is executed using the *same shell* as the one that is currently running the original run.sh script. But it turns out, that is not reliable. The `$SHELL` variable _may_ be set to the full pathname of the currently running shell, but not always -- it may also be set to the _login shell_ of the current user, which may very well be different from the shell used to call the run.sh script. So let's always use `/bin/sh` instead. It is guaranteed to always be there, and that is already the shell that should be used to run the run.sh script (that's the shell set in the script's shebang line). closes #1202
matentzn
approved these changes
Mar 28, 2025
Contributor
matentzn
left a comment
There was a problem hiding this comment.
I know this will work, I dont feel competent to judge any other potential consequences of this change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The idea behind using
$SHELLwhen calling the temporary run.sh script (when running an update_repo command) was to make sure the temporary script is executed using the same shell as the one that is currently running the original run.sh script.But it turns out, that is not reliable. The
$SHELLvariable may be set to the full pathname of the currently running shell, but not always -- it may also be set to the login shell of the current user, which may very well be different from the shell used to call the run.sh script.So let's always use
/bin/shinstead. It is guaranteed to always be there, and that is already the shell that should be used to run the run.sh script (that's the shell set in the script's shebang line).closes #1202