[Libguestfs] The exit code makes user confused while using '-' prefixed subcommands

Qixiang Wan qwan at redhat.com
Wed Mar 31 14:49:47 UTC 2010


guestfish returns 0 if the commands completed without error, or 1 if there was an error.
But the rule break when we use '-' prefix subcommands:
------------------------------------
$ guestfish <<\EOF
> blabla
> EOF
blabla: unknown command
$ echo $?
1
$ guestfish <<\EOF
-blabla
EOF
blabla: unknown command
$ echo $?
0
------------------------------------

I think it should be more reasonable to make the behaviours keeping identical with the rule.




More information about the Libguestfs mailing list