From 61de02f7b815d012a130b001d52a9539f40d4d32 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 23 Aug 2023 16:48:54 +0800 Subject: [PATCH] Tweak `scripts` changes --- src/Console/InstallCommand.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Console/InstallCommand.php b/src/Console/InstallCommand.php index dc39253..f1c21af 100644 --- a/src/Console/InstallCommand.php +++ b/src/Console/InstallCommand.php @@ -132,10 +132,7 @@ protected function appendScriptsToComposer(array $content, Filesystem $filesyste } if (\count($lintScripts) > 0) { - $content['scripts']['lint'] = [ - '@prepare', - ...$lintScripts, - ]; + $content['scripts']['lint'] = $lintScripts; } } @@ -144,7 +141,7 @@ protected function appendScriptsToComposer(array $content, Filesystem $filesyste || $filesystem->exists(Workbench::packagePath('phpunit.xml.dist')) ) { if (! \array_key_exists('test', $content['scripts'])) { - $content['scripts']['test'] = InstalledVersions::isInstalled('pestphp/pest') + $content['scripts']['test'][] = InstalledVersions::isInstalled('pestphp/pest') ? '@php vendor/bin/pest' : '@php vendor/bin/phpunit'; }