dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Sourcing an empty files does not reset exit status
@ 2015-11-17  2:18 Gioele Barabucci
  2015-12-05 15:40 ` Harald van Dijk
  0 siblings, 1 reply; 5+ messages in thread
From: Gioele Barabucci @ 2015-11-17  2:18 UTC (permalink / raw)
  To: dash

Hello,

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

     #!/bin/sh

     echo > ./empty
     false

     . ./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 
2e58422.

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

Regards,

--
Gioele Barabucci <gioele@svario.it>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-06-07  8:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-17  2:18 Sourcing an empty files does not reset exit status Gioele Barabucci
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

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