Skip to content
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

Improve support under Git Bash #62

Open
txava opened this issue May 3, 2019 · 0 comments
Open

Improve support under Git Bash #62

txava opened this issue May 3, 2019 · 0 comments

Comments

@txava
Copy link

txava commented May 3, 2019

I'm getting the following error when running a node bin like ng (Angular CLI) under Git Bash.
/D/Workspaces/codemix_test/cm622/node_modules/.bin/node: line 1: /../node/bin/node: No such file or directory

The problem seems to be related with how basedir it is calculated.

I had to make the following changes to "node_modules/.bin/node" in order to make it work:

#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/../node/bin/node" ]; then
  "$basedir/../node/bin/node" "$@"
 else
  "$basedir/../node/bin/node.exe" "$@"
fi

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

No branches or pull requests

1 participant