on master help sign in
the file needs to be named elm.exe based on testing on Windows

The goal here is to overwrite the JS file on the first run for people who use --ignore-scripts on Windows. This appears to work on Windows only if the resulting file is an .exe and it appears to not matter what the file is named on Mac.

commit64aa6f9bfd5e5574fdba187c8f3f7adee33ffc05 authorEvan Czaplicki <evancz@users.noreply.github.com> dateFri 30 Aug 2019, 15:14 (7 years ago) parent28e9a72
2 files changed+8−3
installers/npm/bin/elm.cmd → installers/npm/bin/elm.exe+6−1 installers/npm/package.json+2−2
installers/npm/bin/elm.cmd → installers/npm/bin/elm.exerenamed+6−1
@@ -13,7 +13,12 @@ var fs = require('fs');
1313// the real binary over itself. So in that case, the first run would
1414// also make an HTTPS request to fetch the real binary. From there,
1515// it calls the binary it downloaded on each run.
16−
16+//
17+// It needs a .exe extension for Windows users. That file extension
18+// should allow this file to run both as a JS script and after it is
19+// replaced by the real Elm binary. The file extension does not appear
20+// to matter on Mac or Linux since it is hidden by the symlink at
21+// node_modules/.bin/elm that most people would refer to.
1722
1823
1924// Make sure we get the right path even if we're executing from the symlinked
installers/npm/package.json+2−2
@@ -25,7 +25,7 @@
2525 "install.js",
2626 "download.js",
2727 "bin",
28− "bin/elm.cmd"
28+ "bin/elm.exe"
2929 ],
3030 "keywords": [
3131 "bin",
@@ -36,7 +36,7 @@
3636 "installer"
3737 ],
3838 "bin": {
39− "elm": "bin/elm.cmd"
39+ "elm": "bin/elm.exe"
4040 },
4141 "dependencies": {
4242 "request": "^2.88.0"