Salome HOME
spns #38683 [EDF] --keep-paths option
[tools/sat.git] / src / fileEnviron.py
index b21dcb94353881fbb3b73b87bd6b3a63215208de..dc8dc8070f5b340ad3162cd143e8d72bd1353b4c 100644 (file)
@@ -489,11 +489,6 @@ class LauncherFileEnviron(FileEnviron):
         if not self.environ.is_defined("PATH"):
             self.environ.set("PATH","")
 
-        if self.init_path:
-            self.output.write('\n'+self.indent)
-            self.add_echo("Modifier cette variable pour ne pas rĂ©initialiser les PATHS")
-            self.output.write(self.indent+'reinitialise_paths=True\n\n')
-
     def add_echo(self, text):
         """Add a comment
         
@@ -906,11 +901,16 @@ def main(args):
   # Identify application path then locate configuration files
   __initialize()
 
-  if args == ['--help']:
+  if '--help' in args:
     from salomeContext import usage
     usage()
     sys.exit(0)
 
+  reinitialise_paths=True
+  if '--keep-paths' in args:
+    reinitialise_paths=False
+    args.remove('--keep-paths')
+
   #from salomeContextUtils import getConfigFileNames
   #configFileNames, args, unexisting = getConfigFileNames( args, checkExistence=True )
   #if len(unexisting) > 0:
@@ -1007,7 +1007,7 @@ launcher_tail_py3="""\
                 _specs = importlib.util.find_spec(module_name)
                 _module = importlib.util.module_from_spec(_specs)
                 _specs.loader.exec_module(_module)
-
+                _module.init(context, out_dir_Path)
     #[manage salome doc command]
     if len(args) >1 and args[0]=='doc':
         _showDoc(args[1:])