Fix a Windows issue where emsdk activate would fail if user account did not contain any entries in its local PATH (but only entries in global/all users PATH).

This commit is contained in:
Jukka Jylänki
2016-06-09 14:02:56 +03:00
parent 6b10a8f4df
commit 4f3f2c9de8

4
emsdk
View File

@@ -1462,7 +1462,9 @@ def adjusted_path(tools_to_activate, log_additions=False, system_path_only=False
# These already exist.
if WINDOWS:
existing_path = win_get_environment_variable('PATH', system=True)
if not system_path_only: existing_path += ENVPATH_SEPARATOR + win_get_environment_variable('PATH', system=False)
if not system_path_only:
current_user_path = win_get_environment_variable('PATH', system=False)
if current_user_path: existing_path += ENVPATH_SEPARATOR + current_user_path
existing_path = existing_path.split(ENVPATH_SEPARATOR)
# Fix up after potential changes made by bug https://github.com/kripken/emscripten/issues/4121