git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git hook question

From
Wesley <wesleys@opperschaap.net>
Date
May 29, 2026, 16:22 UTC
Message-ID
<cdf6b0b1-9211-4b8e-a81c-7d5f2888cd34@opperschaap.net>
In-Reply-To
<c5527d8c-9147-4355-a07d-153d3977108e@opperschaap.net>
On 5/29/26 12:11, Wesley Schwengle wrote:
Show 13 quoted lines
>> Git will paste together the shell command:
>>
>>    npm run test # "$@"
> 
> That doesn't work on my side:
> 
> $ cat ~/.config/git/js.config && git config --get hook.npm-test.command 
> && GIT_TRACE=1 git poh
> [hook "npm-test"]
>    event = pre-push
>    command = npm run test #
>    enabled = true
> npm run test

It does work with: `command = npm run test "#"'

Small oversight.

Cheers, Wesley

-- 
Wesley

Why not both?
Previous: Wesley SchwengleNext: Ben Knoble
Message 4 of 10 in “git hook question”
  1. Wesley SchwengleMay 29, 2026
  2. Jeff KingMay 29, 2026
  3. Wesley SchwengleMay 29, 2026
  4. WesleyMay 29, 2026
  5. Ben KnobleMay 29, 2026
  6. Jeff KingMay 29, 2026
  7. Junio C HamanoJun 1, 2026
  8. Jeff KingJun 1, 2026
  9. Jeff KingMay 29, 2026
  10. Adrian RatiuJun 3, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.