diff --git a/nvm.json b/nvm.json index 5b4ce46024..5afb7a3d8e 100644 --- a/nvm.json +++ b/nvm.json @@ -2,24 +2,31 @@ "homepage": "https://github.com/coreybutler/nvm-windows", "version": "1.1.5", "url": "https://github.com/coreybutler/nvm-windows/releases/download/1.1.5/nvm-noinstall.zip", - "extract_dir": "\\", "bin": [ "nvm.exe", "elevate.cmd", "elevate.vbs" ], + "persist": [ + "nodejs", + "settings.txt" + ], "env_add_path": "nodejs", "env_set": { "NVM_HOME": "$dir", - "NVM_SYMLINK": "$dir\\nodejs" + "NVM_SYMLINK": "$persist_dir\\nodejs" }, "hash": "cbe1b6d71cc420f2d4428e4b7d41b8eb409232706385b2e97f2b749228e370bc", "architecture": { "64bit": { - "post_install": "\"root: $dir `r`narch: 64 `r`nproxy: none `r`noriginalpath: `r`noriginalversion: `r`n\" | Out-File -encoding \"ASCII\" $dir\\settings.txt" + "pre_install": "if(!(test-path \"$dir\\settings.txt\")) { + write-output \"root: $persist_dir\\nodejs`r`narch: 64`r`nproxy: none\" | Out-File -encoding \"ASCII\" $dir\\settings.txt + }" }, "32bit": { - "post_install": "\"root: $dir `r`narch: 32 `r`nproxy: none `r`noriginalpath: `r`noriginalversion: `r`n\" | Out-File -encoding \"ASCII\" $dir\\settings.txt" + "pre_install": "if(!(test-path \"$dir\\settings.txt\")) { + write-output \"root: $persist_dir\\nodejs`r`narch: 32`r`nproxy: none\" | Out-File -encoding \"ASCII\" $dir\\settings.txt + }" } }, "notes": "You'll need to restart powershell/cmd to have it reload Environment Variables so nvm will work correctly",