wrapper: cd to --cwd earlier#448
Merged
Merged
Conversation
Currently, if `haskell-language-server-wrapper` is called with `--cwd`, a cradle will first be loaded and _then_ the change of working directory will happen. This commit reorders this such that if `--cwd` is supplied, the very first action is to change directory. This means a cradle will be found with `--cwd`, rather than the directory that `haskell-language-server-wrapper` was called in.
Contributor
Author
|
I'm not sure if this is or isn't correct, because it's not clear to me what
The reason I'm doing this is to try and work around haskell/hie-bios#195. The current behavior is that the hie-bios cradle constantly intereferes with my own |
Collaborator
|
My personal approach is that --cwd should always be the very first thing done, other than perhaps resolving paths passed on the command line (and even then, its debatable) - therefore I'm in solid agreement with this. |
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.
Currently, if
haskell-language-server-wrapperis called with--cwd, a cradle will first be loaded and then the change of working directory will happen. This commit reorders this such that if--cwdis supplied, the very first action is to change directory. This means a cradle will be found with--cwd, rather than the directory thathaskell-language-server-wrapperwas called in.