Fix #1471 stack commands and file name conflicts#1493
Merged
mgsloan merged 1 commit intocommercialhaskell:masterfrom Dec 12, 2015
Merged
Fix #1471 stack commands and file name conflicts#1493mgsloan merged 1 commit intocommercialhaskell:masterfrom
mgsloan merged 1 commit intocommercialhaskell:masterfrom
Conversation
We were prioritising execution of a file over stack commands if a filename in the current directory was the same as a stack command. With this fix we first try a stack command, then an external command stack-<command> and if those fail we look for a file in the current directory to execute in interpreter mode. If we intend to execute the file we can specify the path like ./filename. I had to refactor `main` to make this work. I tried to minimise the refactoring and limit the scope to only this fix. Main looks better and modular now. closes commercialhaskell#1471
Contributor
|
LGTM, thanks!! |
mgsloan
added a commit
that referenced
this pull request
Dec 12, 2015
Fix #1471 stack commands and file name conflicts
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.
We were prioritising execution of a file over stack commands if a filename in
the current directory was the same as a stack command. With this fix we first
try a stack command, then an external command stack- and if those fail
we look for a file in the current directory to execute in interpreter mode.
If we intend to execute the file we can specify the path like ./filename.
I had to refactor
mainto make this work. I tried to minimise the refactoringand limit the scope to only this fix. Main looks better and modular now.
closes #1471