浏览代码

Merge pull request #207 from orchardup/fig-run-correct-exit-code

Return correct exit code from fig run
Aanand Prasad 11 年之前
父节点
当前提交
715e29d7ba
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      fig/cli/main.py

+ 2 - 1
fig/cli/main.py

@@ -233,10 +233,11 @@ class TopLevelCommand(Command):
             with self._attach_to_container(container.id, raw=tty) as c:
                 service.start_container(container, ports=None, one_off=True)
                 c.run()
+            exit_code = container.wait()
             if options['--rm']:
-                container.wait()
                 log.info("Removing %s..." % container.name)
                 self.client.remove_container(container.id)
+            sys.exit(exit_code)
 
     def scale(self, options):
         """