nvm-vanilla 1.0.20 → 1.0.22

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.20",
3
+ "version": "1.0.22",
4
4
  "description": "node version manager written with node itself",
5
5
  "main": "index.js",
6
6
  "bin": {
package/src/bin.js CHANGED
@@ -53,7 +53,7 @@ const main = async () => {
53
53
  case 'env': {
54
54
  const content = await promisify(fs.readFile)(path.resolve(
55
55
  __dirname,
56
- process.env.PSModulePath ? 'nvm.ps1' : 'nvm.sh'
56
+ process.env.SHELL ? 'nvm.sh' : 'nvm.ps1'
57
57
  ), 'utf-8');
58
58
  process.stdout.write(content);
59
59
  break;
@@ -68,7 +68,7 @@ const main = async () => {
68
68
  if (!targetVersion) throw '';
69
69
  await use(baseDir, targetVersion);
70
70
  } catch (_) {
71
- console.log(process.env.PSModulePath ? ';' : ':');
71
+ console.log(process.env.SHELL ? ':' : ';');
72
72
  }
73
73
  break;
74
74
  }
package/src/index.js CHANGED
@@ -424,10 +424,10 @@ const use = async (baseDir, version, evalFlag = true) => {
424
424
  const value = env[key];
425
425
 
426
426
  // shell
427
- let command = `export ${key}=${value}`;
427
+ let command = `export ${key}="${value}"`;
428
428
 
429
429
  // powershell
430
- if (process.env.PSModulePath) {
430
+ if (!process.env.SHELL) {
431
431
  command = `$env:${key}="${value}"`;
432
432
  }
433
433
 
@@ -1,9 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(npm install:*)",
5
- "Bash(npx eslint:*)",
6
- "Bash(npm run lint)"
7
- ]
8
- }
9
- }