You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if [[ "$(command -v npm)"==$(wslpath 'C:\')* ]];then
42
42
43
-
if! (confirm --title "npm in Windows" --yesno "npm is already installed in Windows in \"$(wslpath -m "$(which npm)")\".\n\nWould you still want to install the Linux version? This will hide the Windows version inside Pengwin." 12 80);then
43
+
if! (confirm --title "npm in Windows" --yesno "npm is already installed in Windows in \"$(wslpath -m "$(command -v npm)")\".\n\nWould you still want to install the Linux version? This will hide the Windows version inside Pengwin." 12 80);then
44
44
echo"Skipping NODE"
45
45
exit 1
46
46
fi
47
47
48
48
sudo tee "${NPM_WIN_PROFILE}"<<EOF
49
+
#!/bin/bash
49
50
50
51
# Check if we have Windows Path
51
-
if ( which cmd.exe >/dev/null ); then
52
+
if ( command -v cmd.exe >/dev/null ); then
52
53
53
54
WIN_C_PATH="\$(wslpath 'C:\')"
54
55
55
56
while [[ true ]]; do
56
57
57
-
WIN_YARN_PATH="\$(dirname "\$(which yarn)")"
58
+
WIN_YARN_PATH="\$(dirname "\$(command -v yarn)")"
58
59
if [[ "\${WIN_YARN_PATH}" == "\${WIN_C_PATH}"* ]]; then
59
60
export PATH=\$(echo "\${PATH}" | sed -e "s#\${WIN_YARN_PATH}##")
60
61
fi
61
62
62
-
WIN_NPM_PATH="\$(dirname "\$(which npm)")"
63
+
WIN_NPM_PATH="\$(dirname "\$(command -v npm)")"
63
64
if [[ "\${WIN_NPM_PATH}" == "\${WIN_C_PATH}"* ]]; then
64
65
export PATH=\$(echo "\${PATH}" | sed -e "s#\${WIN_NPM_PATH}##")
65
66
else
@@ -79,7 +80,7 @@ if [[ ${menu_choice} == *"NVERMAN"* ]]; then
79
80
80
81
echo"Installing n, Node.js version manager"
81
82
curl -L https://git.io/n-install -o n-install.sh
82
-
env SHELL="$(which bash)" bash n-install.sh -y #Force the installation to bash
83
+
env SHELL="$(command -v bash)" bash n-install.sh -y #Force the installation to bash
0 commit comments