-
Notifications
You must be signed in to change notification settings - Fork 841
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
Can't stack exec a .bat file #2225
Comments
I get the same error, using
|
Note that |
cc @snoyberg in case this is actually a |
Note that the path for getting a However, the |
Btw, the argument that GHC should use ShellExecute is probably misguided. ShellExecute is not for running command line tools, its for opening files. Passing a .txt file as a preprocess should not spawn Notepad. Passing an email as a preprocessor should not open Outlook. It's entirely the wrong approach. |
I see - I didn't realize that Windows has no concept of a shebang (I don't use the platform). For the |
There's some specific file-extension-searching logic present in Stack, which currently is hard-coded to just
|
Opened PR #2247 |
There is actually an environment variable on Windows that both gives you the complete list of extensions and the correct ordering.
|
After the patch in #2247 I can run |
I've pushed a commit hopefully addressing both points, can you give it a On Mon, Jun 6, 2016 at 11:20 AM, Neil Mitchell [email protected]
|
Seemingly had no effect:
|
This is all going on in a separate branch, namely:
|
Sorry @snoyberg - got confused by github. Upgraded to something actually including your code and it worked perfectly - much appreciated. |
Awesome, thanks for checking. I'll add a comment to the PR. |
Only potential remark is that you fall back to |
Good point, I even thought to myself that I should make that change and On Mon, Jun 6, 2016 at 2:48 PM, Neil Mitchell [email protected]
|
…sion-windows Support most executable extensions on Windows #2225
Resolved via @snoyberg 's PR |
Given a batch file
hello.bat
I can run it from the Windows command line withhello
,hello.bat
,cmd /c hello
andcmd /c hello.bat
. When runningstack exec -- ...
for any of those 4 variants, usingstack-1.1.2 i386
, I get one of:The
.bat
suffix does not seem to make a difference.The text was updated successfully, but these errors were encountered: