]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Revert "Revert "bos #18467 Minor correction to setenv.py"" EMC2P_V_1_2_0
authorAnthony Geay <anthony.geay@edf.fr>
Thu, 30 Jan 2020 09:22:29 +0000 (10:22 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Thu, 30 Jan 2020 09:22:29 +0000 (10:22 +0100)
This reverts commit 439d6e243818948a685809d0707a02aef93e4930.

bin/setenv.py

index 7ad4a8fb873e1a50167df72b236cdc9c8e5e2e6f..bb93ea8e164c6cb79746f670111c19c646c0e1e2 100755 (executable)
@@ -241,8 +241,9 @@ def set_env(args, modules_list, modules_root_dir, silent=False, keepEnvironment=
 # -----------------------------------------------------------------------------
 
 def main(silent=False, exeName=None):
-    args, modules_list, modules_root_dir = get_config(silent=silent, exeName=exeName)
-    set_env(args, modules_list, modules_root_dir, silent=silent)
+    keep_env = not os.getenv('SALOME_PLEASE_SETUP_ENVIRONMENT_AS_BEFORE')
+    args, modules_list, modules_root_dir = get_config(silent=silent, exeName=exeName, keepEnvironment=keep_env)
+    set_env(args, modules_list, modules_root_dir, silent=silent, keepEnvironment=keep_env)
     return args
 
 # -----------------------------------------------------------------------------