From d09fd5a99692f6df1e11819404f2f6f0436ea818 Mon Sep 17 00:00:00 2001 From: Daniel Leech Date: Fri, 25 Mar 2022 17:25:41 +0100 Subject: [PATCH] Support returning exit codes --- bin/workspace | 2 +- src/Application.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/workspace b/bin/workspace index f42d1898..10b6b92c 100755 --- a/bin/workspace +++ b/bin/workspace @@ -18,7 +18,7 @@ function main(): void } putenv('PATH='.home().'/.my127/workspace/bin:'.getenv('PATH')); - application()->run(); + exit(application()->run()); } function application(): Application diff --git a/src/Application.php b/src/Application.php index ef697b98..2cdafcb3 100644 --- a/src/Application.php +++ b/src/Application.php @@ -20,10 +20,10 @@ public function __construct(Environment $environment, Executor $executor, EventD $this->environment = $environment; } - public function run(?array $argv = null): void + public function run(?array $argv = null): int { $this->option('-v, --verbose Increase verbosity'); $this->environment->build(); - parent::run($argv); + return parent::run($argv); } }