changed poll and some UI bugs.
This commit is contained in:
@@ -27,6 +27,18 @@ need_cmd() {
|
||||
command -v "$1" >/dev/null 2>&1 || fail "Required command not found: $1"
|
||||
}
|
||||
|
||||
node_major_version() {
|
||||
node -p "Number(process.versions.node.split('.')[0])"
|
||||
}
|
||||
|
||||
check_node_version() {
|
||||
need_cmd node
|
||||
major=$(node_major_version)
|
||||
if [ "$major" -lt 22 ]; then
|
||||
fail "Node.js 22.5 or newer is required. Found: $(node -v). Install a current Node.js release and rerun this installer."
|
||||
fi
|
||||
}
|
||||
|
||||
as_root() {
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
"$@"
|
||||
@@ -177,6 +189,7 @@ configure_env() {
|
||||
|
||||
install_dependencies() {
|
||||
need_cmd npm
|
||||
check_node_version
|
||||
log "Installing agent dependencies..."
|
||||
if [ -f "$AGENT_DIR/package-lock.json" ]; then
|
||||
npm --prefix "$AGENT_DIR" ci --omit=dev
|
||||
|
||||
Reference in New Issue
Block a user