Preserve PATH when launching from terminal on MacOS #1758
Merged
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.
Problem: When neovide is launched from a terminal on MacOS, the $PATH of the launching environment is not preserved due to use of the
-l /--login
option for shell commands.This causes problems for me, because when launching neovide from CLI with an activated conda python environment, I would like the PATH be preserved from my terminal session so that the pyright language server starts with the desired python interpreter.
Solution: This solution is based on j4qfrost's work from #309, but it seems like the functionality was lost somewhere along the way :D
So in this PR, I propose using the
--login
option for launching shells if and only if we are launching not from a terminal.