-
Notifications
You must be signed in to change notification settings - Fork 128
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
Shebang processing broken by misbehaving login shell #65
Comments
Thinking about this, perhaps we really want to avoid using the login shell. The likelihood is that preprocessors will live in We can prepend this to the We'd need to have this as an option e.g. Status Icon > Use with homebrew (bool) I think this solves 99% of issues without introducing new unrelated problems. Up for discussion. |
Here's an example where using STDerror + login shell to detect errors in preprocessing gives false positives.
RVM, is using STDERR to send warnings and hints... |
I think catching preprocessor errors is more worthwhile than using the login shell, so adding the homebrew bin path will help most people out. Perhaps others can use a shebang to a shell script as a workaround? |
Hah, well isn’t that helpful of RVM! Here’s some quick thoughts:
What we could do though, is first retrieve the user’s |
I think retrieve the shell to get env, read the path. Then a second shell (with the path injected) to run the preprocessing is the best way. Well the way which would be most useful to the most users. Side note, I doubt RVM is the only thing that writes to STDERR which could be in people's login shell, especially those using bash_it, pretzo, oh-my-zsh, antigen... Etc.
|
Actually, the right solution would be to determine success by the exit code, instead of the length of the standard error. Of course, you would still receive any additional errors to the stream, but I think this might be justifiable. Nevertheless, verifying the exit code should be fixed in any case. |
I think so too, STDERR from a language preprocessor could easily be a warning, which is non-harmful. Exit code 👍 However, doing anything with the login exit status is not correct. Running the preprocessor independently of the login shell should be the way we do this. |
Indeed. |
Looks fine to me. I will spin up a build in a couple hours to test my config.
|
Login shell processes that use
>&2
to send warnings etc. will break preprocessingThe text was updated successfully, but these errors were encountered: