Skip to content

Commit 0674b46

Browse files
authored
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.
1 parent efd71e9 commit 0674b46

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

emsdk.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1490,7 +1490,10 @@ def fetch_nightly_node_versions():
14901490

14911491
def dir_installed_nightly_node_versions():
14921492
path = os.path.abspath('node')
1493-
return [name for name in os.listdir(path) if os.path.isdir(os.path.join(path, name)) and name.startswith("nightly-")]
1493+
try:
1494+
return [name for name in os.listdir(path) if os.path.isdir(os.path.join(path, name)) and name.startswith("nightly-")]
1495+
except Exception:
1496+
return []
14941497

14951498

14961499
def extract_newest_node_nightly_version(versions):

0 commit comments

Comments
 (0)