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

Re: [PATCH] run-command: report exec failure

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 11, 2018, 12:31 UTC
Message-ID
<nycvar.QRO.7.76.6.1812111327460.43@tvgsbejvaqbjf.bet>
In-Reply-To
<xmqqd0q8liow.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On Tue, 11 Dec 2018, Junio C Hamano wrote:
Show 11 quoted lines
> diff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh
> index cf932c8514..9c83d44d9c 100755
> --- a/t/t0061-run-command.sh
> +++ b/t/t0061-run-command.sh
> @@ -13,11 +13,13 @@ cat >hello-script <<-EOF
>  EOF
>  
>  test_expect_success 'start_command reports ENOENT (slash)' '
> -	test-tool run-command start-command-ENOENT ./does-not-exist
> +	test-tool run-command start-command-ENOENT ./does-not-exist 2>err &&
> +	test_i18ngrep "cannot run" err

This breaks on Windows (on Windows, the error message says "cannot spawn", see https://dev.azure.com/git-for-windows/git/_build/results?buildId=26917):

-- snipsnap -- [...] 2018-12-11T11:13:59.9924183Z ++ grep 'cannot run' err 2018-12-11T11:14:00.0092569Z ++ echo 'error: '\''grep cannot run' 'err'\'' didn'\''t find a match in:' 2018-12-11T11:14:00.0099500Z error: 'grep cannot run err' didn't find a match in: 2018-12-11T11:14:00.0100663Z ++ test -s err 2018-12-11T11:14:00.0101058Z ++ cat err 2018-12-11T11:14:00.0239691Z error: cannot spawn ./does-not-exist: No such file or directory 2018-12-11T11:14:00.0254289Z ++ return 1 2018-12-11T11:14:00.0254489Z not ok 1 - start_command reports ENOENT (slash) 2018-12-11T11:14:00.0258844Z error: last command exited with $?=1 2018-12-11T11:14:00.0472195Z # 2018-12-11T11:14:00.0473619Z # test-tool run-command start-command-ENOENT ./does-not-exist 2>err && 2018-12-11T11:14:00.0473874Z # test_i18ngrep "cannot run" err 2018-12-11T11:14:00.0474098Z #

Previous: Jeff KingNext: Junio C Hamano
Message 3 of 10 in “run-command: report exec failure”
  1. run-command: report exec failureJunio C Hamano, Dec 11, 2018
  2. Jeff KingDec 11, 2018
  3. Johannes SchindelinDec 11, 2018
  4. Junio C HamanoDec 11, 2018
  5. John PassaroDec 12, 2018
  6. Jeff KingDec 13, 2018
  7. run-command: report exec failureJunio C Hamano, Dec 12, 2018
  8. Jeff KingDec 13, 2018
  9. Junio C HamanoDec 13, 2018
  10. Johannes SchindelinDec 13, 2018

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.