]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
Add help comment for option keep path
authorDUC ANH HOANG <dh77501n@dsp1043837>
Tue, 21 May 2024 12:17:42 +0000 (14:17 +0200)
committerDUC ANH HOANG <dh77501n@dsp1043837>
Tue, 21 May 2024 12:17:42 +0000 (14:17 +0200)
src/fileEnviron.py

index 9e98b3fd938d79e9273e731114810e0bbcc1df01..9ec3c1783e7bf5e8f1b80c71e43b27b69e3dc0e4 100644 (file)
@@ -811,14 +811,22 @@ def _showDoc(modules):
         print (module+"_ROOT_DIR not found!")
 
 def main(args):
-  # Identify application path then locate configuration files
-  __initialize()
-
-  if args == ['--help']:
     from salomeContext import usage
-    usage()
+
+    appended_opt_doc = \"""
+--keep-paths
+============
+    With this option the environment varaibles PATH, PYTHONPATH and LD_LIBRARY_PATH defined into the starting shell are keept.
+    Without this option all values set before starting SALOME are simply ignored.
+\"""
+    usage(appended_opt_doc=appended_opt_doc)
     sys.exit(0)
 
+  reinitialise_paths=True
+  if '--keep-paths' in args:
+    reinitialise_paths=False
+    args.remove('--keep-paths')
+
 
   # Create a SalomeContext which parses configFileNames to initialize environment
   try: