Skip to content

Conversation

@harendra-kumar
Copy link
Collaborator

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 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 #1471

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
@mgsloan
Copy link
Contributor

mgsloan commented Dec 12, 2015

LGTM, thanks!!

mgsloan added a commit that referenced this pull request Dec 12, 2015
Fix #1471 stack commands and file name conflicts
@mgsloan mgsloan merged commit 677a8c4 into commercialhaskell:master Dec 12, 2015
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.

Ambiguity between a stack command and a filename to execute

2 participants