subcommand: Avoid referencing possibly undefined $ret.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 3 Mar 2015 17:21:06 +0000 (18:21 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 3 Mar 2015 17:21:06 +0000 (18:21 +0100)
commit8c4ae5b0f1b839dea40d7aae40de5e15b325ff35
tree063a583dd626bece10aefd2a729c4ba82d33acec
parentee0253579a48cddcf022a7978afe68bc57311313
subcommand: Avoid referencing possibly undefined $ret.

If a subcommand does not set $ret (like the minimal "hello" example
does), and sets the nounset bash option (set -u), gsu aborts at
the attempt to reference $ret. Fix this flaw by setting $ret to
$GSU_SUCCESS prior to calling the subcommand.

Reported by Congmao Wang.
subcommand