nvm-vanilla 1.0.2 → 1.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nvm-vanilla",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -45,7 +45,7 @@ const promisifySpawn = (command, args, options) => {
45
45
  };
46
46
 
47
47
  const getNodeVersion = async (semanticVersion) => {
48
- const npmViewOutput = await promisify(execFile)('npm', [
48
+ const npmViewOutput = await promisify(execFile)(npmCommand, [
49
49
  'view',
50
50
  nodePackageName + '@' + semanticVersion,
51
51
  'version',
@@ -193,7 +193,7 @@ const corrent = async (version) => {
193
193
 
194
194
  const clear = async (dir) => {
195
195
  if (process.platform == 'win32') {
196
- await promisify(execFile)('rd', ['/s', '/q', dir]);
196
+ await promisify(execFile)('cmd.exe', ['/c', 'rd', '/s', '/q', dir]);
197
197
  } else {
198
198
  await promisify(execFile)('rm', ['-rf', dir]);
199
199
  }
package/src/nvm.ps1 CHANGED
@@ -1,10 +1,8 @@
1
1
  function nvm {
2
- param([string]$Command)
3
-
4
- $result = nvm-vanilla --eval $Command 2>$null
2
+ $result = nvm-vanilla --eval @args 2>$null
5
3
  if ($result) {
6
4
  Invoke-Expression $result
7
5
  } else {
8
- nvm-vanilla $Command
6
+ nvm-vanilla @args
9
7
  }
10
8
  }