Skip to content

Commit

Permalink
[ Fix ] Skip chmod if on windows during install (#36)
Browse files Browse the repository at this point in the history
* skip chmod if on windows during install

* add type coverage script to pre-push hook
  • Loading branch information
ProjektGopher authored Jul 31, 2023
1 parent 2ac31cf commit d87db61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/Commands/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');

Expand Down
1 change: 1 addition & 0 deletions whisky.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"pre-push": [
"composer lint -- --test",
"composer stan",
"composer types",
"composer test"
]
}
Expand Down

0 comments on commit d87db61

Please sign in to comment.