ash: "source <nonexistent file>" makes ash exit?

Bastian Bittorf bittorf at bluebottle.com
Fri Mar 15 21:14:09 UTC 2013


* Joshua Judson Rosen <jrosen at harvestai.com> [15.03.2013 22:00]:
> I just noticed that trying to source a nonexistent file from a script running
> (non-interactively) through ash causes the shell to exit.

i also stumpled over the same? problem.

. nonexistent_file

is not possible, the script just stops.
there is no trap, which can handle this.
only workaround is to check existence.

also: i could'nt find any documentation how
it _should_ be handled. the common way of

. nonexistent_file 2>/dev/null || action

is not possible.

bye, bastian


More information about the busybox mailing list