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
Originally posted by gturi January 12, 2025
I think it would be very useful to make mise populate the environment with the arguments and flags declared in the usage section before running the run section. In this way, tasks definition is made inside toml configuration, while their complex "implementation" is left inside the actual script.
// test.jsconst{ usage_user }=process.env;console.log(`Adding user '${usage_user}'`);
Current output: Adding user 'undefined'
This enhancement also avoids the declaration of arguments both in usage and run section to make them work:
[tasks.add-user]
description = "Add a user"usage = '''arg "<user>"'''# the following definition feels a bit redundant # since I have already defined "user" argument in the usage sectionrun = 'echo {{arg(name="user")}}'#run = 'echo $usage_user' # does not work
The text was updated successfully, but these errors were encountered:
gturi
added a commit
to gturi/mise
that referenced
this issue
Jan 19, 2025
Discussed in #4069
Originally posted by gturi January 12, 2025
I think it would be very useful to make mise populate the environment with the arguments and flags declared in the
usage
section before running therun
section. In this way, tasks definition is made inside toml configuration, while their complex "implementation" is left inside the actual script.Current output:
Adding user 'undefined'
This enhancement also avoids the declaration of arguments both in
usage
andrun
section to make them work:The text was updated successfully, but these errors were encountered: