Skip to content
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

Check that $SILVER_SHELL env var ends with supported shell name #19

Merged
merged 1 commit into from
Sep 12, 2019

Conversation

faokryn
Copy link
Contributor

@faokryn faokryn commented Aug 29, 2019

Fixes bug that caused a panic in terminal emulators that return the full path for $0 (e.g. "/bin/bash" instead of "bash") when users set $SILVER_SHELL to $0 as instructed. Also adds a more descriptive panic message.

Closes #16

Fixes bug that caused a panic in terminal emulators that return the
full path for $0 (e.g. "/bin/bash" instead of "bash") when users set
$SILVER_SHELL to $0 as instructed. Also adds a more descriptive panic
message.
@faokryn
Copy link
Contributor Author

faokryn commented Aug 29, 2019

My first experience with Rust so if there's a better way to go about this, I'd be happy to learn. This just seemed like a clean way to do it without changing the existing code too much.

@reujab
Copy link
Owner

reujab commented Sep 12, 2019

The way I would go about this is taking the base file name of $0 with the std::path crate and matching against that (ec19904).

Anyway, thanks for the pull request.

@reujab reujab merged commit 3d70a0a into reujab:master Sep 12, 2019
@faokryn faokryn deleted the shell_path branch October 13, 2020 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic due to unkown shell
2 participants