Skip to content

[feature] proto exec as option for moon tasks #2568

Description

@harlequin

Describe the solution you'd like

It would be nice to have an attribute within options for setting proto exec as a kind of wrapper for the following command.

I would clearly state that this is only valid for commands and not scripts.

The huge benefit would be that we are developing and deploying a lot of tools via proto and using the activate_environment for specifying environment variables like JAVA_HOME.

When we want to to execute java -jar we have to have a .prototools within the execution directory in order to get the correct java version.

When now in the same execution directory another java tool will be called which is depending on another version of java, the .prototools will not support this natively.

So at the moment we are saying: proto exec java@21 -- java -jar this.jar and proto exec java@8 -- java -jar another.jar

So the options can look like this

options:
  proto_exec_args: ["java@21" ] // This shall be an array to support multiple tools

moon will than wrap the command into the proto exec $proto_exec_args --

So that we as endusers only declare:

java -jar this.jar in the command block

The proto_exec_args can also be extended to have the --tools-from-config to support the .prototools behaivour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions