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
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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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:Beta Was this translation helpful? Give feedback.
All reactions