From 4f2b6ef1a18713081b82eecd46e5f0326b3407af Mon Sep 17 00:00:00 2001 From: DUC ANH HOANG Date: Tue, 21 May 2024 14:17:42 +0200 Subject: [PATCH] Add help comment for option keep path --- src/fileEnviron.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/fileEnviron.py b/src/fileEnviron.py index 9e98b3f..9ec3c17 100644 --- a/src/fileEnviron.py +++ b/src/fileEnviron.py @@ -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: -- 2.39.2