sighjs / sigh

multi-process expressive build system for the web and node.js, built using baconjs observables
209 stars 12 forks source link

Name conflict prevents CLI from working on Windows #52

Closed jaens closed 8 years ago

jaens commented 8 years ago

When using a locally installed sigh CLI (which is linked to node_modules/.bin), commands in npm run do not work because of a name conflict with sigh.js: On Windows, executing sigh will try to run the sigh.js file with the built-in JScript interpreter (ie. Windows will interpret sigh as a command, find a suitable executable in the current directory called sigh.js and execute it, unsuccessfully of course).

jaens commented 8 years ago

Some other build systems for some reason (perhaps this) use the file suffix eg. Gulpfile.js, Brocfile.js

insidewhy commented 8 years ago

Yeah this behaviour of Windows cmd is different to every other OS. In Unix type systems having . in PATH is considered insecure and this behaviour extends that even further and I suspect it isn't even configurable but I hope it might be. I've only recently installed Windows for the first time in almost 20 years ;)

insidewhy commented 8 years ago

Last time I used cmd it was pitiful but recently I've heard it's become an okay shell. Maybe power shell also has this behaviour? Not sure. I'd suggest trying bash or zsh but you probably wanna use those shells as much as I wanna use cmd.

I need to release sigh v0.13.x soon so the breaking change of sigh.js -> sighfile.js could happen then.

unlight commented 8 years ago

Dup https://github.com/sighjs/sigh/issues/15

jaens commented 8 years ago

In fact I ran it (meaning npm run) from zsh using msys2, but npm/Node.js (and pretty much every non-shell) I think uses cmd as the shell for running their commands, so what shell the user is running makes little difference here.

insidewhy commented 8 years ago

True it's a dupe of #15 so we can continue discussion there. Even if it works using some non-default setting that isn't good enough so I'll handle the migration to Sighfile.js with release 0.13