Only add node/bin to user's PATH if one is not already found (#1189)

If the user already has a version of node in their PATH don't clobber
it.  This doesn't effect emscripten since the version of node we use
there is controlled via the config file, not via PATH.

Part of fix for #705.
This commit is contained in:
Sam Clegg
2023-03-03 07:37:33 -08:00
committed by GitHub
parent 17f6a2ef92
commit c04b1bbb3a
2 changed files with 6 additions and 0 deletions

View File

@@ -1433,6 +1433,8 @@ def get_required_path(active_tools):
path_add = [to_native_path(EMSDK_PATH)]
for tool in active_tools:
if hasattr(tool, 'activated_path'):
if hasattr(tool, 'activated_path_skip') and which(tool.activated_path_skip):
continue
path = to_native_path(tool.expand_vars(tool.activated_path))
path_add.append(path)
return path_add