mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-28 20:46:57 +02:00
fix(installer): fall back from stale nvm dir
This commit is contained in:
@@ -1415,6 +1415,9 @@ ensure_default_node_active_shell() {
|
||||
|
||||
load_nvm_for_node_detection() {
|
||||
local nvm_dir="${NVM_DIR:-}"
|
||||
if [[ -n "$nvm_dir" && ! -s "$nvm_dir/nvm.sh" ]]; then
|
||||
nvm_dir=""
|
||||
fi
|
||||
if [[ -z "$nvm_dir" && -s "$HOME/.nvm/nvm.sh" ]]; then
|
||||
nvm_dir="$HOME/.nvm"
|
||||
fi
|
||||
|
||||
@@ -93,6 +93,7 @@ describe("install.sh", () => {
|
||||
].join("\n"),
|
||||
{
|
||||
HOME: home,
|
||||
NVM_DIR: join(tmp, "stale-nvm"),
|
||||
PATH: `${systemBin}:/usr/bin:/bin`,
|
||||
TERM: "dumb",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user