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 want to do the same thing as #1025, but for a condition_script instead of a normal script block.
shebang support for condition scripts was added to resolve #987, but it looks like there isn't an equivalent to script_runner_args to pass args to the script runner selected by the shebang. I would like to pass args to the rust-script runner for the same reasons as in #1025.
Describe The Solution You'd Like
Since the syntax for condition_script is slightly different that normal script, I'm not sure what the solution should look like. The simplest thing may by just to have a condition_script_runner_args field, but that is a little odd because there is no accompanying condition_script_runner field (i.e. using different runners only works via shebangs).
The text was updated successfully, but these errors were encountered:
Currently, I am working around this with a plugin, but I think this would be better suited inside of cargo-make itself. Especially since afaik, there is no way to run multiple different plugins.
[plugins.impl.rust-condition-script-cargo_make_current_task_initial_makefile_directory-substitution]
script = '''# Parse task json into variablestaskjson = json_parse ${task.as_json}# Convert backslashes to forward slashesrust-driver-toolchian-path = replace ${taskjson.env.CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY} "\\" "/"# Replace the ${CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY} variable in the condition_script with the rust-driver-toolchian-pathtaskjson.condition_script = replace ${taskjson.condition_script} "\${CARGO_MAKE_CURRENT_TASK_INITIAL_MAKEFILE_DIRECTORY}" "${rust-driver-toolchian-path}"# Reencode variables into jsontaskjson = json_encode taskjson# Run the invoking task, with the modified condition_scriptcm_plugin_run_custom_task ${taskjson}'''
Feature Description
I want to do the same thing as #1025, but for a
condition_script
instead of a normalscript
block.shebang support for condition scripts was added to resolve #987, but it looks like there isn't an equivalent to
script_runner_args
to pass args to the script runner selected by the shebang. I would like to pass args to therust-script
runner for the same reasons as in #1025.Describe The Solution You'd Like
Since the syntax for
condition_script
is slightly different that normalscript
, I'm not sure what the solution should look like. The simplest thing may by just to have acondition_script_runner_args
field, but that is a little odd because there is no accompanyingcondition_script_runner
field (i.e. using different runners only works via shebangs).The text was updated successfully, but these errors were encountered: