|
@@ 62-69 (lines=8) @@
|
| 59 |
|
if ($inputOutput->askConfirmation($question, false)) { |
| 60 |
|
$gitDirectory = implode(DIRECTORY_SEPARATOR, [dirname(__DIR__, 4), self::GIT_PATH]); |
| 61 |
|
|
| 62 |
|
if (!is_dir($gitDirectory)) { |
| 63 |
|
$errorMessage = "Couldn't locate the .git directory. "; |
| 64 |
|
$errorMessage .= "Aborting the Git hook installation."; |
| 65 |
|
|
| 66 |
|
$inputOutput->error($errorMessage); |
| 67 |
|
|
| 68 |
|
return false; |
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
$hookFile = implode(DIRECTORY_SEPARATOR, [$gitDirectory, self::HOOKS_PATH, self::HOOK_FILENAME]); |
| 72 |
|
$existingHookFile = false; |
|
@@ 122-129 (lines=8) @@
|
| 119 |
|
if ($inputOutput->askConfirmation($question, false)) { |
| 120 |
|
$gitDirectory = implode(DIRECTORY_SEPARATOR, [dirname(__DIR__, 4), self::GIT_PATH]); |
| 121 |
|
|
| 122 |
|
if (!is_dir($gitDirectory)) { |
| 123 |
|
$errorMessage = "Couldn't locate the .git directory. "; |
| 124 |
|
$errorMessage .= "Aborting the Git commit message template installation."; |
| 125 |
|
|
| 126 |
|
$inputOutput->error($errorMessage); |
| 127 |
|
|
| 128 |
|
return false; |
| 129 |
|
} |
| 130 |
|
|
| 131 |
|
$templateFile = implode(DIRECTORY_SEPARATOR, [$gitDirectory, self::TEMPLATE_FILENAME]); |
| 132 |
|
|