Skip to content
Snippets Groups Projects
Commit af444299 authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Start setup file with bash -e.

parent 692f883a
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment