From ab4d41f385209bff0ae1f98c6bcce7dea5666fff Mon Sep 17 00:00:00 2001 From: Len Woodward Date: Sun, 30 Jul 2023 21:30:19 -0700 Subject: [PATCH] skip chmod if on windows during install --- app/Commands/Install.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Commands/Install.php b/app/Commands/Install.php index 2f90a98..d6927ff 100644 --- a/app/Commands/Install.php +++ b/app/Commands/Install.php @@ -41,11 +41,13 @@ public function handle(): int $this->installHook($hook); }); - if ($this->option('verbose')) { - $this->info('Verifying hooks are executable...'); + if (! Whisky::isWindows()) { + if ($this->option('verbose')) { + $this->info('Verifying hooks are executable...'); + } + exec('chmod +x '.Whisky::cwd('.git/hooks').'/*'); + exec('chmod +x '.Whisky::base_path('bin/run-hook')); } - exec('chmod +x '.Whisky::cwd('.git/hooks').'/*'); - exec('chmod +x '.Whisky::base_path('bin/run-hook')); $this->info('Git hooks installed successfully.');