defenseunicorns / maru-runner

The Unicorn Task Runner
Apache License 2.0
11 stars 1 forks source link

Identifier for when commands are run inside of a task #78

Closed UncleGedd closed 6 months ago

UncleGedd commented 6 months ago

Is your feature request related to a problem? Please describe

I'd like to know when the commands I'm running are being run from a task

Specific Problem

If I run uds deploy from a Maru task, I'd like it to not use all the BubbleTea output and behave as if it were in CI; in order to do this, UDS CLI needs to know that it's being called inside a task

Describe the solution you'd like

Describe alternatives you've considered

  1. To solve the specific uds run problem, we could just pass --no-tea as an argument to ./uds inside a task. This will work but requires a small change to Maru and its configuration to allow additional args to the mutated ./uds command

  2. Add an env var (similar to how Maru currently does with architecture) indicating that the command is being run inside of a task. For example, MARU=true or something like that

Additional context

Relates to https://github.com/defenseunicorns/uds-cli/issues/529

UncleGedd commented 6 months ago

IMO, option 2 seems simpler and more generic. Surely there are use cases outside of ./uds deploy where commands/scripts/etc would like to know they're being run from a task