File tree Expand file tree Collapse file tree 2 files changed +21
-4
lines changed
Expand file tree Collapse file tree 2 files changed +21
-4
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
33## master
4- [ v4.2.0...master] ( https://github.com/deployphp/deployer/compare/v4.2.0...master )
4+ [ v4.2.1...master] ( https://github.com/deployphp/deployer/compare/v4.2.1...master )
5+
6+ -
7+
8+ ## v4.2.1
9+ [ v4.2.0...v4.2.1] ( https://github.com/deployphp/deployer/compare/v4.2.0...v4.2.1 )
10+
11+ ### Fixed
12+ - Fixed ` deployer/phar-update ` dependency for composer installation.
513
6- ...
714
815## v4.2.0
916[ v4.1.0...v4.2.0] ( https://github.com/deployphp/deployer/compare/v4.1.0...v4.2.0 )
Original file line number Diff line number Diff line change @@ -42,9 +42,11 @@ protected function getDefaultInputDefinition()
4242 protected function getDefaultCommands ()
4343 {
4444 $ commands = parent ::getDefaultCommands ();
45- if ('phar: ' === substr (__FILE__ , 0 , 5 )) {
45+
46+ if ($ this ->isPharArchive ()) {
4647 $ commands [] = $ this ->selfUpdateCommand ();
4748 }
49+
4850 return $ commands ;
4951 }
5052
@@ -65,7 +67,10 @@ private function selfUpdateCommand()
6567 protected function getDefaultHelperSet ()
6668 {
6769 $ helperSet = parent ::getDefaultHelperSet ();
68- $ helperSet ->set (new PharUpdateHelper ());
70+
71+ if ($ this ->isPharArchive ()) {
72+ $ helperSet ->set (new PharUpdateHelper ());
73+ }
6974 return $ helperSet ;
7075 }
7176
@@ -89,4 +94,9 @@ public function addUserArgumentsAndOptions()
8994 $ this ->getDefinition ()->addArguments ($ this ->getUserDefinition ()->getArguments ());
9095 $ this ->getDefinition ()->addOptions ($ this ->getUserDefinition ()->getOptions ());
9196 }
97+
98+ public function isPharArchive ()
99+ {
100+ return 'phar: ' === substr (__FILE__ , 0 , 5 );
101+ }
92102}
You can’t perform that action at this time.
0 commit comments