-
-
Notifications
You must be signed in to change notification settings - Fork 926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mithril's Bundler overrides Ruby Bundler in 'npm run' scripts #1668
Comments
For now I'm using a postinstall script to remove Mithril's bundle symlink from //…
"scripts": {
"postinstall": "rm -f node_modules/.bin/bundle",
//…
}
//… |
@illarionvk so installing Mithril as an NPM dependency adds Mithril's |
@barneycarroll Installing Mithril as an NPM dependency adds a symlink of Mithril's |
@barneycarroll I think it is intentional in order to allow meta-packages of commands. I'm surprised there's no way to bypass the |
@barneycarroll This is a standard NPM behavior:
|
I'm extremely surprised by this behaviour. Apparently it was introduced in npm@3 as a necessary measure to allow dependency scripts to function with a flattened dependency tree. But the notion that dependency scripts should affect your path really seems like an unacceptable oversight to that solution. The change to Mithril you're proposing makes sense, but the underlying issue is an NPM bug AFAIC. What if a dependency has a |
Yarn doesn't symlink stuff to You have control over the symlink names of Mithril's binaries in https://github.com/lhorie/mithril.js/blob/next/package.json#L32 |
:-\ And this adds to the list of reasons why I feel it shouldn't be publicly exported. (I've noted this opinion of mine multiple times in the past.) |
OK I totally missed the point @illarionvk, thought you were talking about npm script references as opposed to bins. I don't see any reason why ospec and bundler can't be referenced by explicit path since they're only used in npm scripts anyway. What do we think? |
@barneycarroll |
^ agree |
It's an internal-only thing, so publishing it doesn't make much sense. Fixes MithrilJS#1668
I'm working on an app that will be hosted on Github Pages. I use github-pages gem to compile the static site with Jekyll locally.
I use npm scripts in
package.json
to run the build task:The
bundle exec
command should launch Ruby Bundler gem, but it launches Mithril's Bundler instead. This happens because npm scripts look up executables innode_modules/.bin
folder first.Ruby Bundler is far more popular than Mithril's Bundler. Would you consider renaming the executable in .bin folder from
bundle
tomithril-bundle
?The text was updated successfully, but these errors were encountered: