Open sangee2004 opened 1 year ago
How is false pased? I feel like this is missing a step.
@cjellick I am able to set boolean flag to "true" when it is passed with "=" like --newApp=false
in the arg list.
This issue is seen only when it is passed with out "=" like --newApp false
in the arg list.
In the example provided in the above issue ,
acorn run -n mytest -f Acornfilebool -- --newApp=false --newtext nnupdate --oldtext ooupdate
works as expected.
The issue is seen only when we launch the app as follows without "=" for the boolean args
acorn run -n mytest -f Acornfilebool -- --newApp false --newtext nnupdate --oldtext ooupdate
Not a blocker. Moving to low
This is a limitation of the flag parsing lib we use. See: https://github.com/spf13/cobra/issues/613
Not super high priority, but im tempted to go as far a dropping use of the actual bool flag and have our own string-based bool-ish flag that behaves more predictably
acorn version v0.8.0-80-g635ea0a6+635ea0a6
Steps to reproduce the problem:
newApp
-acorn run -n mytest . --newApp false --newtext nnupdate --oldtext ooupdate
Acornfile used:
This results in
newApp
being set totrue
Spec for the app shows
newApp
set to true even when "false" was passed.Possibly related to type not shown for boolean args in
acorn help