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 +1 -1
- package/src/bin.js +2 -2
- package/src/index.js +2 -2
- package/.claude/settings.local.json +0 -9
package/package.json
CHANGED
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.
|
|
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.
|
|
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}
|
|
427
|
+
let command = `export ${key}="${value}"`;
|
|
428
428
|
|
|
429
429
|
// powershell
|
|
430
|
-
if (process.env.
|
|
430
|
+
if (!process.env.SHELL) {
|
|
431
431
|
command = `$env:${key}="${value}"`;
|
|
432
432
|
}
|
|
433
433
|
|