diff --git a/src/Commands/ComposerInstall.php b/src/Commands/ComposerInstall.php new file mode 100644 index 0000000..ebc517e --- /dev/null +++ b/src/Commands/ComposerInstall.php @@ -0,0 +1,36 @@ +warn('composer not installed'); + return; + } + exec($composerCommand . ' install'); + } +} diff --git a/src/LaravelGitHooksServiceProvider.php b/src/LaravelGitHooksServiceProvider.php index 1572ddd..58b8dec 100644 --- a/src/LaravelGitHooksServiceProvider.php +++ b/src/LaravelGitHooksServiceProvider.php @@ -2,6 +2,7 @@ namespace Feek\LaravelGitHooks; +use Feek\LaravelGitHooks\Commands\ComposerInstall; use Feek\LaravelGitHooks\Commands\ESLint; use Feek\LaravelGitHooks\Commands\Phpcs; use Feek\LaravelGitHooks\Commands\Phpcbf; @@ -24,6 +25,7 @@ public function boot() { if ($this->app->runningInConsole()) { $this->commands([ + ComposerInstall::class, ESLint::class, Phpcs::class, Phpcbf::class,