Salome HOME
Fix launch of .salome_run gdd_env_modules_in_config_appli
authorGilles DAVID <gilles-g.david@edf.fr>
Tue, 19 Sep 2017 14:37:51 +0000 (16:37 +0200)
committerGilles DAVID <gilles-g.david@edf.fr>
Tue, 19 Sep 2017 15:26:05 +0000 (17:26 +0200)
Using the cwd param in subprocess.Popen changes the current directory,
which is not what we want.

bin/appliskel/salome

index b8b43e800f505ecc2a3c53c390a0c23ad420533e..d44507d2c29f6d535090710a1740e3cfd4609def 100755 (executable)
@@ -20,9 +20,8 @@ def main(args):
         env_modules_option += "%s" % ','.join(env_modules)
         args.append(env_modules_option)
 
-    currentPath = os.path.realpath(os.path.dirname(os.path.abspath(__file__)))
-    proc = subprocess.Popen(['./.salome_run'] + args,
-                            close_fds=True, cwd=currentPath)
+    appliPath = os.path.realpath(os.path.dirname(os.path.abspath(__file__)))
+    proc = subprocess.Popen([os.path.join(appliPath, '.salome_run')] + args, close_fds=True)
     out, err = proc.communicate()
     return out, err, proc.returncode