Skip to content

Commit e60dba0

Browse files
committed
Merge pull request #18 from xel1045/master
[Fix #2 #15] Allow to specify the config file location & A macro should stop if one of its task fails
2 parents e511bdc + 2b8a24a commit e60dba0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Envoy.blade.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
@setup
2-
$baseCwd = isset($__current_cwd) ? $__current_cwd : getcwd();
3-
$configFile = $baseCwd.'/app/config/deploy.php';
2+
$baseCwd = isset($__current_cwd) ? $__current_cwd : getcwd();
3+
$configFile = $baseCwd .'/'. (isset($configFile) ? $configFile : 'app/config/deploy.php');
44

55
if ( ! file_exists($configFile)) {
6-
throw new Exception('Config file app/config/deploy.php not found.');
6+
throw new Exception('Config file '. $configFile .' not found.');
77
}
88

99
$deployConfig = include($configFile);
@@ -282,6 +282,8 @@
282282
@error
283283
if ($task === 'deploy:check') {
284284
throw new Exception('Unmet prerequisites to deploy. Have you run deploy:setup?');
285+
} else {
286+
throw new Exception('Whoops, looks like something went wrong');
285287
}
286288
@enderror
287289

0 commit comments

Comments
 (0)