Fix node nightly check when no node.js versions are installed (#1594)

This line failed when there are no Node.js's installed at all.
This commit is contained in:
juj
2025-08-27 19:57:16 +03:00
committed by GitHub
parent efd71e9a2e
commit 0674b46e36

View File

@@ -1490,7 +1490,10 @@ def fetch_nightly_node_versions():
def dir_installed_nightly_node_versions():
path = os.path.abspath('node')
return [name for name in os.listdir(path) if os.path.isdir(os.path.join(path, name)) and name.startswith("nightly-")]
try:
return [name for name in os.listdir(path) if os.path.isdir(os.path.join(path, name)) and name.startswith("nightly-")]
except Exception:
return []
def extract_newest_node_nightly_version(versions):