diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg index 2fb3be9c5..c6391b515 100755 --- a/scripts/git-hooks/commit-msg +++ b/scripts/git-hooks/commit-msg @@ -3,15 +3,15 @@ echo "Executing .git/hooks/commit-msg...\n"; $repo_root = getcwd(); -$original_argv = $_SERVER['argv']; +$original_argv = $argv; $commit_msg = rtrim(file_get_contents($original_argv[1]), "\n"); // Construct pseudo `blt commit-msg $commit_msg` call. -$_SERVER['argv'] = [ +$argv = [ $repo_root . '/bin/blt', 'internal:git-hook:execute:commit-msg', $commit_msg, ]; -$_SERVER['argc'] = count($_SERVER['argv']); +$argc = count($argv); require __DIR__ . '/../../bin/blt-robo.php';