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.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 C8AC61F54E for ; Thu, 1 Sep 2022 17:58:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233865AbiIAR6B (ORCPT ); Thu, 1 Sep 2022 13:58:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232332AbiIAR55 (ORCPT ); Thu, 1 Sep 2022 13:57:57 -0400 X-Greylist: delayed 1038 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 01 Sep 2022 10:57:56 PDT Received: from dalaran.tastycake.net (dalaran.tastycake.net [IPv6:2001:ba8:0:1c0::1:1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B04676967 for ; Thu, 1 Sep 2022 10:57:55 -0700 (PDT) Received: from 77.116.2.81.in-addr.arpa ([81.2.116.77] helo=lucy.dinwoodie.org) by dalaran.tastycake.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oToAJ-0005K0-EK; Thu, 01 Sep 2022 18:39:43 +0100 Received: from adam by lucy.dinwoodie.org with local (Exim 4.94.2) (envelope-from ) id 1oToAI-007IEE-AT; Thu, 01 Sep 2022 18:39:42 +0100 Date: Thu, 1 Sep 2022 18:39:42 +0100 From: Adam Dinwoodie To: Git Mailing List Cc: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , =?utf-8?B?xJBvw6BuIFRy4bqnbiBDw7RuZw==?= Danh , Emily Shaffer Subject: [PATCH] t1800: correct test to handle Cygwin Message-ID: <20220901173942.abolcr4aa5gixncm@lucy.dinwoodie.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Cygwin, when failing to spawn a process using start_command, Git outputs the same error as on Linux systems, rather than using the GIT_WINDOWS_NATIVE-specific error output. The WINDOWS test prerequisite is set in both Cygwin and native Windows environments, which means it's not appropriate to use to anticipate the error output from start_command. Instead, use the MINGW test prerequisite, which is only set for Git in native Windows environments, and not for Cygwin. Signed-off-by: Adam Dinwoodie --- The job of setting Cygwin up to get Git CI builds, either as part of the main CI builds or as something using separate automation, is rapidly rising up my when-I-have-the-time to-do list... t/t1800-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t1800-hook.sh b/t/t1800-hook.sh index 64096adac7..fae8b2faf9 100755 --- a/t/t1800-hook.sh +++ b/t/t1800-hook.sh @@ -159,7 +159,7 @@ test_expect_success 'git hook run a hook with a bad shebang' ' # TODO: We should emit the same (or at least a more similar) # error on Windows and !Windows. See the OS-specific code in # start_command() - if test_have_prereq !WINDOWS + if test_have_prereq !MINGW then cat >expect <<-\EOF fatal: cannot run bad-hooks/test-hook: ... -- 2.37.2