mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 22:31:51 +00:00
Fix compilation if python3 is the default python
This commit is contained in:
parent
0a4d3a2944
commit
72bb240d5b
2
bin/python
Executable file
2
bin/python
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
/usr/bin/env python2 $*
|
3
nvm.sh
3
nvm.sh
@ -247,6 +247,9 @@ nvm()
|
||||
elif [ "`curl -Is "http://nodejs.org/dist/node-$VERSION.tar.gz" | grep '200 OK'`" != '' ]; then
|
||||
tarball="http://nodejs.org/dist/node-$VERSION.tar.gz"
|
||||
fi
|
||||
# If python2 is available it should be used so that node compilation works on systems
|
||||
# where python3 is the default python.
|
||||
command -v python2 >/dev/null 2>&1 && export PATH=$NVM_DIR/bin:$PATH
|
||||
if (
|
||||
[ ! -z $tarball ] && \
|
||||
mkdir -p "$NVM_DIR/src" && \
|
||||
|
Loading…
Reference in New Issue
Block a user