You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello, i'm currently testing the usage support for mise task and testing the --force flag from the example.
I have the following script:
#!/usr/bin/env bash
#USAGE flag "-f --force" help="Overwrite existing <file>" count=true
#USAGE flag "-u --user <user>" help="User to run as"
#USAGE arg "<file>" help="The file to write" default="file.txt"
#USAGE arg "<arg_with_default>" help="An arg with a default" default="mydefault"
#MISE description="This is a test cmd1 script"
#MISE alias="cd1"
echo "all: $@"
echo "usage_force: $usage_force"
echo "usage_user: $usage_user"
echo "usage_file: $usage_file"
echo "usage_arg_with_default: $usage_arg_with_default"
but when running several tests:
# mise run java:cmd1 -f
[java:cmd1] $ ~/.config/mise/tasks/java/cmd1
all:
usage_force:
usage_user:
usage_file: file.txt
usage_arg_with_default: mydefault
# mise run java:cmd1 -f --user=test
[java:cmd1] $ ~/.config/mise/tasks/java/cmd1 --user=test
all: --user=test
usage_force:
usage_user: test
usage_file: file.txt
usage_arg_with_default: mydefault
# mise run java:cmd1 -f --user=test -f
[java:cmd1] $ ~/.config/mise/tasks/java/cmd1 --user=test -f
all: --user=test -f
usage_force: true
usage_user: test
usage_file: file.txt
usage_arg_with_default: mydefault
you can see that -f only become true when the user flag is also set and the -f is set after the user flag, is this an expected behavior ? or am I missing something ?
thank you
The text was updated successfully, but these errors were encountered:
hello, i'm currently testing the usage support for mise task and testing the --force flag from the example.
I have the following script:
but when running several tests:
you can see that -f only become true when the user flag is also set and the -f is set after the user flag, is this an expected behavior ? or am I missing something ?
thank you
The text was updated successfully, but these errors were encountered: