-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Hey there 👋 !
I've recently added a --verbose option to one of my mise tasks, alongside a bunch of other #USAGE flags and arguments. Everything works as expected, other than the --verbose flag.
What I've observed is that, if the --verbose flag is the first parameter, it seems to be grabbed by mise and not passed to the task.
This can be replicated with a minimal task like:
#!/usr/bin/env bash
#MISE description="Sample task."
#USAGE flag "--verbose" help="Output extra debug logging."
#USAGE flag "--other-flag" help="Random extra test flag."
#USAGE flag "--force" help="Ignore caches."
if [ "$usage_verbose" = "true" ] ; then
echo "Verbose"
else
echo "Not verbose"
fi
if [ "$usage_force" = "true" ] ; then
echo "Force"
else
echo "Do not force"
fiRunning mise run sample-task --verbose results in the unexpected output:
Not verbose
Do not force
Running mise run sample-task --other-flag --verbose results in the expected output:
Verbose
Do not force
Is there anything I need to change in my usage config, or should I be running tasks in a different way? This issue looks similar to #162, but the solution suggested on that ticket just appears to open the interactive task selector for me.
Any guidance is appreciated 🙇♂.