nodeswitch 1.9.3 → 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.
Files changed (2) hide show
  1. package/bin/nodeswitch.cmd +4 -10
  2. package/package.json +1 -1
@@ -1,5 +1,4 @@
1
1
  @echo off
2
- setlocal ENABLEDELAYEDEXPANSION
3
2
 
4
3
  if not "%1" == "" (
5
4
  if not "%2" == "" (
@@ -31,19 +30,14 @@ if not "%1" == "" (
31
30
  )
32
31
  ) else if "%1" == "add" (
33
32
  if not exist %AppData%\nodeswitch\%2 (
34
- curl -f https://nodejs.org/download/release/v%2/ > nul 2>&1
35
- if !ERRORLEVEL! equ 0 (
36
- curl -s -o %AppData%\nodeswitch\%2.zip https://nodejs.org/download/release/v%2/node-v%2-win-x64.zip > nul
37
-
38
- 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 || (
39
35
  del %AppData%\nodeswitch\%2.zip
40
36
  echo Node version not created
41
37
  exit
42
38
  )
43
39
 
44
- tar -xf %AppData%\nodeswitch\%2.zip -C %AppData%\nodeswitch
45
-
46
- if not !ERRORLEVEL! equ 0 (
40
+ tar -xf %AppData%\nodeswitch\%2.zip -C %AppData%\nodeswitch || (
47
41
  del %AppData%\nodeswitch\%2.zip
48
42
  rd /s /q %AppData%\nodeswitch\node-v%2-win-x64
49
43
  echo Node version not created
@@ -52,7 +46,7 @@ if not "%1" == "" (
52
46
 
53
47
  del %AppData%\nodeswitch\%2.zip
54
48
  move %AppData%\nodeswitch\node-v%2-win-x64 %AppData%\nodeswitch\%2 > nul
55
- ) else (
49
+ ) || (
56
50
  echo Node version not found
57
51
  )
58
52
  ) else (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodeswitch",
3
- "version": "1.9.3",
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",