File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,22 @@ var targetPath = fs.realpathSync(process.argv[1]);
2727process . chdir ( path . join ( path . dirname ( targetPath ) , ".." ) ) ;
2828
2929install ( process . platform , process . arch ) . then ( function ( ) {
30- spawn ( targetPath , process . argv . slice ( 2 ) , {
30+ // we have to do this because the Elm binaries end in `.exe` on
31+ // Windows. Really, we should fix this upstream (in binwrap), but in the
32+ // interests of getting the installers out we're going to do this temporarily
33+ // and ship a fix upstream later.
34+ var replacement = process . argv . slice ( 2 ) ;
35+ if ( process . platform === "win32" ) {
36+ replacement += ".exe" ;
37+
38+ if ( fs . existsSync ( replacement ) ) {
39+ // if we replaced the bootstrap script, we should remove it. Otherwise we'd
40+ // have two of them laying around on Windows (elm and elm.exe)
41+ fs . unlinkSync ( process . argv . slice ( 2 ) ) ;
42+ }
43+ }
44+
45+ spawn ( targetPath , replacement , {
3146 stdio : "inherit"
3247 } ) . on ( "exit" , process . exit ) ;
33- } ) ;
48+ } ) ;
You can’t perform that action at this time.
0 commit comments