diff --git a/usr/lib/python3.8/spoc/app.py b/usr/lib/python3.8/spoc/app.py index 640147f..95a6999 100644 --- a/usr/lib/python3.8/spoc/app.py +++ b/usr/lib/python3.8/spoc/app.py @@ -98,7 +98,13 @@ class App: for container,container_defintion in definition['containers'].items(): self.create_container(container, container_defintion) # Run install script and register the app - self.run_script('install') + try: + self.run_script('install') + except: + # Stop all containers if install.sh fails + for container in self.containers: + container.stop() + raise repo_local.register_app(self.name, self.get_definition()) def update(self, observer=None):