@@ -1,13 +1,13 @@
11#!/usr/bin/env node
22
33var child_process = require('child_process');
4−var package = require('../package.json');
54var path = require('path');
65var fs = require('fs');
76
87
9−// Some npm users enable --ignore-scripts (a good security measure)
10−// They do not run the post-install hook, so install.js does not run.
8+// Some npm users enable --ignore-scripts (a good security measure) so
9+// they do not run the post-install hook and install.js does not run.
10+// Instead they will run this script.
1111//
1212// On Mac and Linux, we download the elm executable into the exact same
1313// location as this file. Since npm uses symlinks on these platforms,
@@ -15,7 +15,7 @@ var fs = require('fs');
1515// runs will call the elm binary directly.
1616//
1717// On Windows, we must download a file named elm.exe for it to run properly.
18−// Instead of symlinks, they create two files:
18+// Instead of symlinks, npm creates two files:
1919//
2020// - node_modules/.bin/elm (a bash file)
2121// - node_modules/.bin/elm.cmd (a batch file)
@@ -27,7 +27,7 @@ var fs = require('fs');
2727
2828// figure out where to put the binary (calls path.resolve() to get path separators right on Windows)
2929//
30−var binaryPath = path.resolve(__dirname, package.bin) + (process.platform === 'win32' ? '.exe' : '');
30+var binaryPath = path.resolve(__dirname, 'elm') + (process.platform === 'win32' ? '.exe' : '');
3131
3232// Run the command directly if possible, otherwise download and then run.
3333// This check is important for Windows where this file will be run all the time.