Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Define environment variables based on the output of commands #17

@breml

Description

@breml

I would like to be able to define additional environment variables based on the output of a command. As a practical example, I would like to set an environment variable HOSTNAME, with the result of the command hostname -s as the value.
I could implement this on my own, but I would like to get your opinion about the right way to configure this.

Possibilities which come to my mind:

  1. New configuration element
[tasks.envs]
    cmdenvs = [ [ "HOSTNAME", "hostname", "-s" ] ]
  1. Extension of the existing envs, e.g. with a macro/placeholder, which evaluates the additional arguments:
[tasks.envs]
    envs = [ [ "HOSTNAME", "@exec", "hostname", "-s" ] ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions