Github messages for voidlinux
 help / color / mirror / Atom feed
From: ahesford <>
Subject: Re: common/hooks/post-install/ fix return code of failed trigger runs
Date: Thu, 22 Jul 2021 05:30:45 +0200	[thread overview]
Message-ID: <20210722033045.uZ3K5Lt0HOoCCWZTg7rPr03iqC1EWJAIRYZfioeCcqY@z> (raw)
In-Reply-To: <>

[-- Attachment #1: Type: text/plain, Size: 848 bytes --]

New comment by ahesford on void-packages repository

As pointed out in IRC by @sgn, a much more elegant approach is the just `|| exit` after each trigger invocation. The bare `exit` will forward the (failed) return code of the trigger out of the shell and we don't need to capture an intermediate variable.

While I'm poking around here, I also noticed that none of the trigger arguments are quoted. By convention none by `$CONF_FILE` should contain spaces, so this doesn't matter; also, no existing trigger uses the `$CONF_FILE` argument anyway. Nevertheless, should it ever become important, quoting the `$CONF_FILE` is a good idea since the configuration path provided by a user might contain spaces arbitrarily. I'm quoting everything else just in case.

  parent reply	other threads:[~2021-07-22  3:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22  3:03 [PR PATCH] " ahesford
2021-07-22  3:26 ` [PR PATCH] [Updated] " ahesford
2021-07-22  3:30 ` ahesford [this message]
2021-08-31 15:39 ` ahesford
2021-08-31 15:39 ` ahesford
2021-08-31 15:41 ` ahesford
2022-05-30  2:15 ` github-actions
2022-10-10 10:23 ` Duncaen
2022-10-11 17:48 ` [PR PATCH] [Closed]: " ahesford
2022-10-11 17:53 ` ahesford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210722033045.uZ3K5Lt0HOoCCWZTg7rPr03iqC1EWJAIRYZfioeCcqY@z \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).