mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(install): reject PATH runtimes with broken npm (#107825)
* fix(install): reject runtimes with broken npm * test(installer): use real Node for npm selection --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
@@ -447,6 +447,7 @@ link_node_runtime_paths() {
|
||||
}
|
||||
|
||||
linked_node_is_usable() {
|
||||
local candidate_bin
|
||||
local current_version
|
||||
local required_version
|
||||
|
||||
@@ -462,6 +463,10 @@ linked_node_is_usable() {
|
||||
if ! semver_at_least "$current_version" "$required_version"; then
|
||||
return 1
|
||||
fi
|
||||
candidate_bin="$(node_dir)/bin"
|
||||
if ! PATH="${candidate_bin}:${PATH}" "$(npm_bin)" --version >/dev/null 2>&1; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
"$(node_bin)" -e '
|
||||
const { DatabaseSync } = require("node:sqlite");
|
||||
|
||||
Reference in New Issue
Block a user