-
Notifications
You must be signed in to change notification settings - Fork 204
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
Run .devcontainer/launch.sh
with bash + add error checking
#407
Conversation
Otherwise the script will be run with the user's shell, not bash.
Previously if an invalid combination was specified we would get errors from cp and sed, and then launch vscode anyway. Instead, check for existence of the devcontainer.json and exit, providing a useful error message, if it doesn't.
After the update to 12.2 containers, the example usage in launch.sh does not boot a valid container.
Thanks a lot for the contribution 🎉 |
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.
Thanks @wence-!
Admittedly, I have been neglecting the launch.sh
ever since I hit a roadblock in supporting custom CTK/host compiler combinations. I wrote up the status quo here: #126 (comment)
@wence- could you please add the We want to avoid running expensive GPU tests for pure infrastructure fixes. Any issues with the changes will be found by the CPU-only build tests |
This way, we get a useful early exit if some other command later in the script bails.
1367fad
to
ca806e0
Compare
Done, thanks! |
/ok to test |
Thanks a lot for fixing the launch script 🥇 |
Description
For the shebang line to work, it must be the first line of the file (not the second as at present).
While here, add
set -euo pipefail
and notice, and provide, a useful error message if we've requested a CTK + compiler combo that doesn't have a prebaked devcontainer.json. Previously, we would get errors fromcp
andsed
and then launch vscode anyway.A partial step towards #126, in that unknown devcontainer combinations are now at least noticed.
Checklist