dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gioele Barabucci <gioele@svario.it>
To: dash@vger.kernel.org
Subject: Sourcing an empty files does not reset exit status
Date: Tue, 17 Nov 2015 03:18:53 +0100	[thread overview]
Message-ID: <n2e2qe$voq$1@ger.gmane.org> (raw)


a bug has been filed in the Debian BTS about dash not resetting the exit 
status after sourcing an empty file with the dot command. [1]

The following test echoes "OK" with bash and "fail" with dash


     echo > ./empty

     . ./empty && echo "OK" || echo "fail"

A similar bug in dash has been discussed and addressed in 2011 [2], but 
it looks like the solution has been only partial.

The version of dash I tested is the current git master branch, commit 

[1] https://bugs.debian.org/777262
[2] http://article.gmane.org/gmane.comp.shells.dash/531


Gioele Barabucci <gioele@svario.it>

             reply	other threads:[~2015-11-17  2:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17  2:18 Gioele Barabucci [this message]
2015-12-05 15:40 ` Harald van Dijk
2016-06-06 10:13   ` [PATCH] eval: Return status in eval functions Herbert Xu
2016-06-06 21:14     ` Harald van Dijk
2016-06-07  8:47       ` [PATCH v2] " Herbert Xu

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='n2e2qe$voq$1@ger.gmane.org' \
    --to=gioele@svario.it \
    --cc=dash@vger.kernel.org \
    --subject='Re: Sourcing an empty files does not reset exit status' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).