Skip to content

Commit 048c6af

Browse files
authored
Fix various bugs (#11)
1 parent 49c60f0 commit 048c6af

5 files changed

Lines changed: 9 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Changelog
22

3-
All notable changes to `laravel-git-commit-checker` will be documented in this file.
3+
All notable changes to `botble/git-commit-checker` will be documented in this file.
44

5+
## 2.1.1 - 2023-01-06
6+
7+
- Fix various bugs
58

69
## 2.1.0 - 2023-01-06
710

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"require": {
3030
"php": "^8.0|^8.1|^8.2",
31-
"laravel/framework": "^9.32|^10.0",
31+
"laravel/framework": "^9.32",
3232
"laravel/pint": "^1.3.0"
3333
},
3434
"require-dev": {

resources/views/summary.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@foreach($result['files'] as $file)
44
<div class="mb-1 mt-2">
55
<span class="px-1 bg-red text-white uppercase">File</span>
6-
<span class="ml-1">{{ ltrim(str_replace(base_path(), '', $file['name']), '/') }}</span>
6+
<span class="ml-1">{{ ltrim(str_replace(base_path(), '', $file['name']), DIRECTORY_SEPARATOR) }}</span>
77
</div>
88

99
<div class="flex max-w-150">

src/Commands/InstallCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ protected function install(string $hook, string $class): bool
6767
$script = $this->generateHookScript($command->getName());
6868

6969
$path = $this->laravel->basePath('.git/hooks/' . $hook);
70+
$relativePath = ltrim(str_replace($this->laravel->basePath(), '', $path), DIRECTORY_SEPARATOR);
7071

7172
if (
7273
$this->laravel['files']->exists($path) &&
73-
! $this->confirmToProceed($path . ' already exists, do you want to overwrite it?', true)
74+
! $this->confirmToProceed($relativePath . ' already exists, do you want to overwrite it?', true)
7475
) {
7576
return false;
7677
}

src/Commands/PreCommitHookCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function handle(): int
5252
])
5353
);
5454

55-
if ($process->isSuccessful()) {
55+
if (! $process->isSuccessful()) {
5656
return self::FAILURE;
5757
}
5858

0 commit comments

Comments
 (0)