From af444299e64b6eb4204330fe1d975c2772920b9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Diemer?= <stephane.diemer@ubicast.eu>
Date: Tue, 25 Oct 2016 16:54:25 +0200
Subject: [PATCH] Start setup file with bash -e.

---
 envsetup.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/envsetup.py b/envsetup.py
index c804e17b..7e038986 100755
--- a/envsetup.py
+++ b/envsetup.py
@@ -45,7 +45,7 @@ class EnvSetup():
                     setup_module = imp.load_source('setup_%s' % name, os.path.join(path, self.PY_SETUP_NAME))
                     self.actions.append(dict(index=index, label=label, path=path, fct=setup_module.setup))
                 elif os.path.isfile(os.path.join(path, self.BASH_SETUP_NAME)):
-                    self.actions.append(dict(index=index, label=label, path=path, fct=os.path.join(path, self.BASH_SETUP_NAME)))
+                    self.actions.append(dict(index=index, label=label, path=path, fct='bash -e "%s"' % os.path.join(path, self.BASH_SETUP_NAME)))
                 else:
                     self.actions.append(dict(index=index, label=label, path=path, fct=None))
         self.actions.sort(key=lambda a: a['index'])
@@ -155,7 +155,7 @@ class EnvSetup():
                     try:
                         os.chdir(action['path'])
                         if isinstance(action['fct'], str):
-                            utils.run_commands(['\'%s\'' % action['fct']])
+                            utils.run_commands([action['fct']])
                         else:
                             action['fct'](interactive)
                     except Exception as e:
-- 
GitLab