-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
Test program here:
FLAGS "$@" || exit $?
eval set -- "${FLAGS_ARGV}"
if [ ${FLAGS_foo} -eq ${FLAGS_TRUE} ]; then
echo "true"
else
echo "false"
fi
With:
DEFINE_boolean foo false "bar" "f"
Output (as expected):
$ foo-test.sh
false
$ foo-test.sh -f
true
$ foo-test.sh --nof
false
$ foo-test.sh --foo
true
$ foo-test.sh --nofoo
false
With:
DEFINE_boolean foo true "bar" "f"
Output (unexpected):
$ foo-test.sh
true
$ foo-test.sh -f
false
$ foo-test.sh --nof
false
$ foo-test.sh --foo
true
$ foo-test.sh --nofoo
false
If it's not obvious from the above output, the part that is unexpected is the output of foo-test.sh -f