Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

CLI switch to install cmd and sh executables on non-windows systems #17317

Open
arei opened this issue Jun 19, 2017 · 0 comments
Open

CLI switch to install cmd and sh executables on non-windows systems #17317

arei opened this issue Jun 19, 2017 · 0 comments

Comments

@arei
Copy link

arei commented Jun 19, 2017

Was #13360 but the npm-bot closed it, but it remains valid.

npm should be able to install both the .cmd and the shell version of the executable scripts to .bin when installing on a linux machine. Not being able to may prevent some cases where users might pass packages around internally but not be able to execute on all environments.

Currently an npm install will only install symbolic links on linux, but will install both a .cmd version and a shell version in .bin on windows. This request is for a switch that could be used to force linux installs to behave like windows install (for the purpose of configuring .bin) and generate both instead of symlinks. I know that --bin-links false can be used to disable the symlinks, but then you end up with nothing in .bin at all.

Perhaps something like --bin-flavor
auto - Do the default flavor based on OS as it does now (default)
links - only do symlinks (nothing on windows)
shell - only generate a shell script regardless of OS.
cmd - only generate a .cmd script regardless of OS.
both - generate both shell and .cmd scripts regardless of OS.

This is not a critical problem as one can always install on windows and get both; more of a nice to have.

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

No branches or pull requests

1 participant