File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 50
50
],
51
51
"scripts" : {
52
52
"post-create-project-cmd" : [
53
- " ViewComponents\\ TestingHelpers\\ Installer\\ Installer::postComposerInstall"
53
+ " ViewComponents\\ TestingHelpers\\ Installer\\ Installer::runFromComposer"
54
+ ],
55
+ "post-update-cmd" : [
56
+ " ViewComponents\\ TestingHelpers\\ Installer\\ Installer::runFromComposer"
54
57
],
55
58
"test" : " php vendor/phpunit/phpunit/phpunit" ,
56
59
"serve" : " php serve" ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ abstract class AbstractInstaller
14
14
15
15
abstract public function run ();
16
16
17
- public static function postComposerInstall (Event $ event )
17
+ public static function runFromComposer (Event $ event )
18
18
{
19
19
$ installer = new static ($ event );
20
20
$ installer ->run ();
Original file line number Diff line number Diff line change 1
1
<?php
2
2
namespace ViewComponents \TestingHelpers \Installer ;
3
3
4
- use Composer \Script \Event ;
5
-
6
4
class Installer extends AbstractInstaller
7
5
{
8
6
public function run ()
9
7
{
10
8
if ($ this ->isInstalled ()) {
11
- if (false === $ this ->askYesNo ('Application already installed. Reinstall? ' , false )) {
9
+ if (
10
+ $ this ->event ->getName () === 'post-update-cmd '
11
+ || false === $ this ->askYesNo ('Application already installed. Reinstall? ' , false )
12
+ ) {
12
13
goto finish;
13
14
};
14
15
}
You can’t perform that action at this time.
0 commit comments