From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.1 required=3.0 tests=AWL,BAYES_00,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id A36271F601 for ; Sat, 17 Dec 2022 08:34:44 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; secure) header.d=web.de header.i=@web.de header.b="tX244BTK"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229954AbiLQIed (ORCPT ); Sat, 17 Dec 2022 03:34:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbiLQIeb (ORCPT ); Sat, 17 Dec 2022 03:34:31 -0500 Received: from mout.web.de (mout.web.de [212.227.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D0443E0AA for ; Sat, 17 Dec 2022 00:34:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1671266068; bh=8cQQZZVEtv39+tFOuXywlb9NOWSPxyt/kb6/ivCCLJE=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=tX244BTKnjh3oPB2zkERh+1R04X+htBwnJ5zIQvfnPO5nQQsj1EAIkHG3LmlSX1mN DPjtGxWt64LcR1eNw83UvFyrR7pidixXDaRf1h1I9ZjOwpt0O2B6BlWHQaD0qYpsZO 226vaFVyQpeFbWtAJC4mjclOYs7Vtc6/zOWIrDYblnA0KM82xnUfvYWDpgNnrQLX/u mz+OEi+xCQQsKtFJObiDqoZsHo/AQjKs1ntCFCzIcjkqAiWI78rpigZHcqfBqWnOEB 0DeApIabSI17irVshwmgFd8ruyMVphSaMzIDOAvUhrECunR0LRsISzc7vw0R7VBz0J CWVnzGVuusLOQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.29] ([91.47.151.35]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MbCDq-1oVC1b3Zs0-00bnPL; Sat, 17 Dec 2022 09:34:27 +0100 Message-ID: <18ad9fae-2afd-4315-c65f-d9bb92fa30fe@web.de> Date: Sat, 17 Dec 2022 09:34:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: Issue with git > 2.36.1 and pre-commit hook on macOS M1 Content-Language: en-US To: Piotrek Cc: =?UTF-8?B?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , git@vger.kernel.org References: <51d5993f-a1e0-519e-ffa9-ec5205c5e96d@o2.pl> <30f80aa4-d5c1-4fce-f1c9-710eabeaa022@web.de> <7054faf0-0f5b-e4a8-3166-bf715ed45a32@web.de> From: =?UTF-8?Q?Ren=c3=a9_Scharfe?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:rwLcecty2EZ8H5hFrTOCAvQ9Zi3n5TG5Fi/sk6WABfjXOKWAYkq 86idWaoVp+0Ubgbbbps71Qe6kzM1LhsGvmMP22Nmb5yiFZwaR8TrkZU2A4XouTL9LiNIwlV w8uT3Stbrb93YmbGGaXCkS57EGY1jtlXmGl15qGXJEjRfgGJ4Lw3g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ID: X-Mailing-List: git@vger.kernel.org Am 17.12.22 um 08:50 schrieb Piotrek: > On 14.12.2022 23:23, Ren=C3=A9 Scharfe wrote: > >> Curious that only macOS should be affected.=C2=A0 Is stdin of a hook sc= ript a >> TTY on that platform?=C2=A0 Or can "docker compose" handle stdin not be= ing a >> TTY and stdout being one there? > Well, seems like I somehow tested this wrong. Tried it again from > scratch and on linux I also get this error. Ah, OK. > Docker compose CLI options page is a little confusing because of > these: > >>--interactive , -i=C2=A0 true=C2=A0 Keep STDIN open even if not attached= . >>--no-TTY , -T=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 true= =C2=A0 Disable pseudo-TTY allocation (default: auto-detected). >>--tty , -t=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 true=C2= =A0 Allocate a pseudo-TTY. > > Second column with `true` values is titled `Default`, whatever it means. > So `--tty` and `--no-TTY` is set by default? Anyway, seems like it is > checking if at least one of stdout, stding, stderr is a tty and then > tries to allocate a tty to all. > > You can check docs here > https://docs.docker.com/engine/reference/commandline/compose_run/#option= s Yeah, having the last two both on by default seems impossible. Perhaps the text in the parenthesis means that "default" is actually to detect TTYs automatically? In any case the help text could be clearer. > As a final solution I used makefile "magic" with `ifeq` and shell comman= d like this: > > =C2=A0=C2=A0=C2=A0 $(shell test -t 0) > =C2=A0=C2=A0=C2=A0 ifeq ($(.SHELLSTATUS), 1) > =C2=A0=C2=A0=C2=A0 ALLOCATE_TTY =3D --no-TTY > =C2=A0=C2=A0=C2=A0 endif > > =C2=A0=C2=A0=C2=A0 docker compose run $(ALLOCATE_TTY) --rm --entrypoint = "" app /code/test.sh OK. Would be nice if "docker compose" could handle that case automatically, though, wouldn't it? :) > Maybe I'll just write to to them to clarify documentation on how > those TTY options actually works by default. Good idea. Ren=C3=A9