nodeswitch 1.9.2 → 1.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,19 +30,14 @@ if not "%1" == "" (
30
30
  )
31
31
  ) else if "%1" == "add" (
32
32
  if not exist %AppData%\nodeswitch\%2 (
33
- curl -f https://nodejs.org/download/release/v%2/ > nul 2>&1
34
- if %ERRORLEVEL% equ 0 (
35
- curl -s -o %AppData%\nodeswitch\%2.zip https://nodejs.org/download/release/v%2/node-v%2-win-x64.zip > nul
36
-
37
- if not %ERRORLEVEL% equ 0 (
33
+ curl -f https://nodejs.org/download/release/v%2/ > nul 2>&1 && (
34
+ curl -s -o %AppData%\nodeswitch\%2.zip https://nodejs.org/download/release/v%2/node-v%2-win-x64.zip > nul || (
38
35
  del %AppData%\nodeswitch\%2.zip
39
36
  echo Node version not created
40
37
  exit
41
38
  )
42
39
 
43
- tar -xf %AppData%\nodeswitch\%2.zip -C %AppData%\nodeswitch
44
-
45
- if not %ERRORLEVEL% equ 0 (
40
+ tar -xf %AppData%\nodeswitch\%2.zip -C %AppData%\nodeswitch || (
46
41
  del %AppData%\nodeswitch\%2.zip
47
42
  rd /s /q %AppData%\nodeswitch\node-v%2-win-x64
48
43
  echo Node version not created
@@ -51,7 +46,7 @@ if not "%1" == "" (
51
46
 
52
47
  del %AppData%\nodeswitch\%2.zip
53
48
  move %AppData%\nodeswitch\node-v%2-win-x64 %AppData%\nodeswitch\%2 > nul
54
- ) else (
49
+ ) || (
55
50
  echo Node version not found
56
51
  )
57
52
  ) else (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodeswitch",
3
- "version": "1.9.2",
3
+ "version": "1.9.4",
4
4
  "description": "Node version switcher for Microsoft Windows x64",
5
5
  "scripts": {
6
6
  "preinstall": "node scripts/preinstall.js",