Skip to content

Commit cf357d0

Browse files
committed
Corrects the chmod call to use the numeric format instead of octal in hook installation commands.
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
1 parent 246d5f5 commit cf357d0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/Console/Command/GitHooksCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
110110
}
111111

112112
$this->filesystem->copy($file->getRealPath(), $hookPath, $overwrite);
113-
$this->filesystem->chmod($hookPath, 0o755, 0o755);
113+
$this->filesystem->chmod($hookPath, 755, 0o755);
114114

115115
$output->writeln(\sprintf('<info>Installed %s hook.</info>', $file->getFilename()));
116116
}

tests/Console/Command/GitHooksCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function executeWillCopyPackagedHooks(): void
127127
->willReturn('/app/.git/hooks');
128128
$this->filesystem->copy(Argument::containingString('/post-merge'), '/app/.git/hooks/post-merge', true)
129129
->shouldBeCalledOnce();
130-
$this->filesystem->chmod('/app/.git/hooks/post-merge', 0o755, 0o755)
130+
$this->filesystem->chmod('/app/.git/hooks/post-merge', 755, 0o755)
131131
->shouldBeCalledOnce();
132132

133133
self::assertSame(GitHooksCommand::SUCCESS, $this->executeCommand());

0 commit comments

Comments
 (0)