nvm-vanilla 1.0.1 → 1.0.3

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.1",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
package/src/bin.js CHANGED
@@ -43,7 +43,7 @@ const main = async () => {
43
43
  __dirname,
44
44
  process.platform == 'win32' ? 'nvm.ps1' : 'nvm.sh'
45
45
  ), 'utf-8');
46
- process.stdin.write(content);
46
+ process.stdout.write(content);
47
47
  break;
48
48
  }
49
49
  case 'use': {
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',
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
+ }
package/src/nvm.sh CHANGED
@@ -32,4 +32,4 @@ case "$SHELL" in
32
32
  autoload -U add-zsh-hook
33
33
  add-zsh-hook chpwd _nvm_autoload_hook
34
34
  ;;
35
- esac
35
+ esac