File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -43,16 +43,24 @@ public function __construct()
43
43
44
44
public function dep ($ command )
45
45
{
46
+ // Merge arguments and options.
46
47
$ this ->parameters = $ this ->getParameters ();
47
48
$ this ->providedFile = $ this ->parameters ->pull ('--file ' );
48
49
$ this ->providedStrategy = $ this ->parameters ->pull ('--strategy ' );
49
50
51
+ // Force Ansi mode if not specified.
52
+ if ($ this ->parameters ->intersect (['--ansi ' , '--no-ansi ' ])->isEmpty ()) {
53
+ $ this ->parameters ->push ('--ansi ' );
54
+ }
55
+
56
+ // Fetch deploy config file.
50
57
if (! $ deployFile = $ this ->getDeployFile ()) {
51
58
$ this ->error ("config/deploy.php file not found. " );
52
59
$ this ->error ("Please run `php artisan deploy:init` to get started. " );
53
60
return ;
54
61
}
55
62
63
+ // Delegate to DeployerPHP with the right parameters.
56
64
$ parameters = $ this ->getParametersAsString ($ this ->parameters );
57
65
$ depBinary = 'vendor ' . DIRECTORY_SEPARATOR . 'bin ' . DIRECTORY_SEPARATOR . 'dep ' ;
58
66
return $ this ->process ("$ depBinary --file= $ deployFile $ command $ parameters " );
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ public function getParameters()
22
22
public function parseArguments ()
23
23
{
24
24
return collect ($ this ->arguments ())
25
- ->reject (function ($ value ) {
26
- return ! $ value && ! is_string ($ value ) && ! is_numeric ($ value );
25
+ ->filter (function ($ value ) {
26
+ return $ value || is_string ($ value ) || is_numeric ($ value );
27
27
})
28
28
->pipe (function ($ arguments ) {
29
29
$ command = $ arguments ->get ('command ' );
You can’t perform that action at this time.
0 commit comments