fix install on older systems
This commit is contained in:
@@ -265,27 +265,14 @@ def ensure_minimum_nodejs(min_version=MIN_NODEJS_VERSION):
|
||||
if match:
|
||||
current_major = int(match.group(1))
|
||||
if current_major >= min_version:
|
||||
print(f"✓ Node.js {node_ver} is sufficient (>= v{min_version})")
|
||||
return True
|
||||
else:
|
||||
print(f"✗ Node.js {node_ver} is too old (< v{min_version})")
|
||||
else:
|
||||
print(f"Cannot parse Node.js version: {node_ver}")
|
||||
except FileNotFoundError:
|
||||
print("Node.js not found")
|
||||
except Exception as e:
|
||||
print(f"Error checking Node.js version: {e}")
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
print(f"Installing Node.js v{min_version} from NodeSource...")
|
||||
install_node_from_nodesource(str(min_version))
|
||||
|
||||
try:
|
||||
node_ver = runout(["node", "--version"], check=False).strip()
|
||||
print(f"✓ Node.js {node_ver} installed successfully")
|
||||
return True
|
||||
except Exception as e:
|
||||
print(f"Failed to verify Node.js installation: {e}")
|
||||
return False
|
||||
|
||||
def download_extract_tar_gz(url: str, dest_dir: Path) -> Path:
|
||||
dest_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
Reference in New Issue
Block a user