From 0816b18d9a3bf09b6d7da3b051c77c95fbee0702 Mon Sep 17 00:00:00 2001 From: DUC ANH HOANG Date: Wed, 31 May 2023 10:05:21 +0200 Subject: [PATCH] permit to define SALOME_APPLICATION_DIR on the salome context --- bin/runSalomeOnDemand.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/runSalomeOnDemand.py b/bin/runSalomeOnDemand.py index 3047b209c..78673e421 100755 --- a/bin/runSalomeOnDemand.py +++ b/bin/runSalomeOnDemand.py @@ -51,7 +51,11 @@ def set_ext_env(app_name='', version=''): logger.debug('Set an env for app: %s, version: %s...', app_name, version) # Get the root directory - app_root = get_app_root() + app_root = os.environ.get('SALOME_APPLICATION_DIR', '') + if not app_root: + app_root = get_app_root() + logger.warning( + 'Env var SALOME_APPLICATION_DIR is not set! It will be setted by default in %s.'%app_root) # Set the root dir as env variable context = salomeContext.SalomeContext(None) -- 2.39.2