From 4f3f2c9de8148a29be15530bce9d58964f0cd457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Thu, 9 Jun 2016 14:02:56 +0300 Subject: [PATCH] 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). --- emsdk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/emsdk b/emsdk index 99b0540..c98d05b 100755 --- a/emsdk +++ b/emsdk @@ -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