Skip to content
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

Maybe add ".CMD" to this list? And make the documentation more explicit that the file extensions are appended to the input? #1899

Closed
josiahdj opened this issue Apr 30, 2018 · 4 comments
Labels

Comments

@josiahdj
Copy link
Contributor

https://github.com/fsharp/FAKE/blob/7f99a9c4350b6b15a044254977c882574cd72b61/src/app/Fake.Core.Process/Process.fs#L622

In my case, it took me a while to track down why this wasn't finding "grunt.cmd" the way it used to in FAKE 4 (for Windows). Simple fix in my build script was to remove the ".cmd", so I "fixed it" for myself, but this could confuse other people?

@matthid
Copy link
Member

matthid commented Apr 30, 2018

Is the PATHEXT variable not defined on your system?

@josiahdj
Copy link
Contributor Author

It is, and I got it to work once I removed the .cmd at the end of the command (grunt.cmd) I wanted. Maybe a good way of handling this is:
if Environment.isWindows and the end of the file given already contains one of the extensions listed in PATHEXT, then don't re-append the postFix values from the PATHEXT in the call to Seq.tryPick?

@matthid
Copy link
Member

matthid commented Apr 30, 2018

Ah now I get it. You basically suggest doing a search with empty "suffix" first. Yes that sounds reasonable.

I guess for cross platform compatibility we assume users don't specify the file-extension there

@josiahdj
Copy link
Contributor Author

josiahdj commented May 1, 2018

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants