From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4IwGLYu+5mK3wQAAbAwnHQ (envelope-from ) for ; Sun, 31 Jul 2022 19:40:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kDX0LIu+5mIt2AAAauVa8A (envelope-from ) for ; Sun, 31 Jul 2022 19:40:27 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 61ADF252C5 for ; Sun, 31 Jul 2022 19:40:27 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id A303A5E53B; Sun, 31 Jul 2022 17:40:24 +0000 (UTC) X-Greylist: delayed 470 seconds by postgrey-1.36 at yantan; Sun, 31 Jul 2022 17:40:22 UTC Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [IPv6:2a0b:5c81:1c1::37]) by mail.notmuchmail.org (Postfix) with ESMTPS id 1A3295E00B for ; Sun, 31 Jul 2022 17:40:22 +0000 (UTC) Received: from c53.nor.fi (unknown [IPv6:2a0b:a700:bb::53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 586051B00244; Sun, 31 Jul 2022 20:32:32 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1659288752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ctgJcrkhoBWR8PPajjSvZKHC/z0KCNP5nk3sv4JT1pw=; b=iQ3CsVIWrGMaP7FVz/OmXHTB4a8uBgjw/sRyDS+SNLDg6UGC0+Rd5iZCcQpxHtSI3SbTEX Lnms3poD7mE90PltV4A09OhsXC+qZBqdugzeBzpmeekV332R1wfJu1zbxaRc2abRIMSCdI OhwNwfBKmiG2+pldfpv9zWO/KF3SKTJqWmIFFYllkxsLRv/ImX9O7pq7Wyn9Q2RG/PmZE8 MIV9sTC3LL6A7czgUt4vaHvV/HCdOvENlcsTk+6QK0fVzvvgFVp9EUBnvi4Fc8iyiL0xfH FJeiF1s0I9h1rOZQAJcDtSbWhzN8vqyVrvRXHUKUvI9Qwn93CY1UvCpkjIEBqA== From: Tomi Ollila To: notmuch@notmuchmail.org Subject: [PATCH] notmuch.c: add missing trailing newlines in two error messages Date: Sun, 31 Jul 2022 20:32:11 +0300 Message-Id: <20220731173211.165098-1-tomi.ollila@iki.fi> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1659288752; a=rsa-sha256; cv=none; b=LMn1Qef5YjhrxHI8GOSnkir+tWLjjjQkjNMI8Cd6uJyP7VpQbYIGv4nKSjLFqsBqfIf/W+ YDV70C5Ha2O32nFZodC3WkWWCp4a8IXzTWnFDpL5e762bzRY4tCMAuTexDmds5HiSECrtT uWoUmMhp+Ii4YD9Vk50UovPL6vMfXDQz6XwdpL/oEMs5IqKyrTduvStmfa0Ix17m+rPk0c DZnvlI4NDV+swoqT/yxNXA0FszGDue+Q4LeAmuDAQXJ1Hqd3ggv4kaDdkCaPDSEw+rPTTJ zd6SONLevrqqL6UslF6gXXEoCoIfLQB6vSb9YPEaSHQkMwBawz57mubBkVWQkg== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1659288752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ctgJcrkhoBWR8PPajjSvZKHC/z0KCNP5nk3sv4JT1pw=; b=N3SUSb5b/mBmUSKq6ON0hni8VrtCVv96R4lZMAVAVyFcyQzQ2nfRqVY/RlNz6So7Sg9EQv Mf/kZWw+JfV7gLb/QRPf6I4xCekq2TcKQ7EgtVD3vTg04Ecf2056pUVgK1fp4XUgcqaCha YiDVIuPVAVjcDCN3BV1DPjhvy6pjuXSep01YpysMb66x94gq2n8cSqVU9VTy2doGXREjHV Yac+iYPL1J3bVbL53LQFpqWLrllF2cWkT5e1o4B37nYQS4J3D5qHl6c/Rg0VZFybRHZ2z/ dpLdpzOjNK26jZ5dpBP2kd8rKD1dkDqY8MwR3wAFNxb6hdZWtlJsuynmkpz/mg== Message-ID-Hash: OREEVSN7TFVZXN2GM4SHUDZ7FRK4BYVU X-Message-ID-Hash: OREEVSN7TFVZXN2GM4SHUDZ7FRK4BYVU X-MailFrom: tomi.ollila@iki.fi X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: tomi.ollila@iki.fi X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659289227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=hMYZ4RPEox+7KsOehmLyT1SCnCrhuB1q3AEPz9xCL7Y=; b=Zqe+G9STz6pqm7lri+GiHYjfjwuloF3aBH7R3WnOYdu60Nbe0QRSNYLgEfH3CnUuPg1m7Y cKGWF6LjeU4l4DhPTjZLW48X5yHFXeZaEj5XGOOZiaPaVWPdPzse1ju9Lc36qcKuVWbe1T A2t9mysQiUag/MSloeB0m5keedM7Bc5faMc0P5/Z2pLM80mlJmjKpOQPuEk3YXlgQuQmQF uuL9nz0NrUKJ8EeSv8/PvghvrjYnamOjh1V4WV79sYyVQ7ORUyotX1BoKSaKAQLuq34NWl oLfNY17Qp8pCyvC6SrAaIFtZBvPaRtQ2mlh6XsC3k9/MAX10AxtPytLHowJXUQ== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1659289227; a=rsa-sha256; cv=fail; b=qwkGleaOgS8jPSYU5HFSXLbTg74tSlBhOGA4DBU8MmfLWe7sFWMf+9RJhUVtbJrMKl/wWn htkkdydg6x/CB4US53dYlncqn6FrId/UH0x5GLri4wCH2t3v0gGbFncPGlPMdkNC7S0oUY L/Q3FMkT+KyyrxsJQdUkN58MhzjRs5QiB6GuHYnt5w21wk3+ECHmI4/NgOduyqTw5+YTdG qMCnoWuOiy70fHJZX4ISmZw7RlbOSVRfTter33/2rOPNRA3y9nRym/LG8C7yWflN238t+R +XYpRNr9fRTVR/veiOYahPYMyquWCzrreWmwc8CENABih2uLQ06t4+rwcPZrpA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=iQ3CsVIW; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 2.43 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=iQ3CsVIW; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 61ADF252C5 X-Spam-Score: 2.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: 56RpnHmTJEpo Removed duplicate error check (and the message) in 3rd case where the same error message (w/o trailing newline) was present. In case of test/T040-setup.sh, command substitution deletes trailing newlines, so related test there cannot be changed (and therefore could not notice this user experience flaw). --- The current error message can be experienced with $ NOTMUCH_CONFIG=no-cnfig-thre notmuch new and (the second change, removed in this commit) $ NOTMUCH_CONFIG=no-cnfig-thre notmuch config notmuch.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/notmuch.c b/notmuch.c index c75b0188..37286b8f 100644 --- a/notmuch.c +++ b/notmuch.c @@ -531,7 +531,7 @@ main (int argc, char *argv[]) } if (status == NOTMUCH_STATUS_NO_CONFIG) - fputs ("Try running 'notmuch setup' to create a configuration.", stderr); + fputs ("Try running 'notmuch setup' to create a configuration.\n", stderr); return EXIT_FAILURE; } @@ -563,15 +563,10 @@ main (int argc, char *argv[]) NULL, ¬much, &status_string); - - if (status == NOTMUCH_STATUS_NO_CONFIG && ! (command->mode & NOTMUCH_COMMAND_CONFIG_CREATE)) { - fputs ("Try running 'notmuch setup' to create a configuration.", stderr); - goto DONE; - } switch (status) { case NOTMUCH_STATUS_NO_CONFIG: if (! (command->mode & NOTMUCH_COMMAND_CONFIG_CREATE)) { - fputs ("Try running 'notmuch setup' to create a configuration.", stderr); + fputs ("Try running 'notmuch setup' to create a configuration.\n", stderr); goto DONE; } break; -- 2.34.1