Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arbitrarily override silent: true on the root of the taskfile. #1455

Open
osher opened this issue Jan 3, 2024 · 2 comments
Open

arbitrarily override silent: true on the root of the taskfile. #1455

osher opened this issue Jan 3, 2024 · 2 comments

Comments

@osher
Copy link

osher commented Jan 3, 2024

Lets first distinct between two users:

  • User - developer using the taskfile
  • Automation Engineer - developer of the taskfile.

True, in many cases they are the same, but the bigger the team/org the higher the probability that they are not.
As such they have different expectations.

User Usecase 1

As automation user
I don't want to see the internals, I just want the job done.
For this - the automation engineers should provide silent: true in the root of the taskfiles.

User Usecase 2

As automation user
I want an option to see "under the hood"
so I can gain trust on the system or consider destructive commands before I run them

⛔ In this case, --dry does not work on levels where silent: true is used
If that's on the root - then it's all levels, and --dry does nothing and yields no output.

Automation Engineer Usecase 1

As an automation engineer
I want to be able to reverse this setting arbitrarily as I run locally in task development / troubleshoot,
so that I can ask to see what's under the hood without changing codes.

Automation Engineer Usecase 2

As an automation engineer
When I run with --dry
I expect silent: true to be overridden with silent: false and be propagated down to all levels.
So that I can debug my project without gotchas

⛔ In this case, --dry does not work on levels where silent: true is applied

Automation Engineer Usecase 3

As an automation engineer
I would like to control silent mode using environment variables
So that I don't have to provide --silent: false every time.
e.g. TASK_SILENT_MODE

Proposed Logic

I propose that when --silent to be stronger than TASK_SILENT_MODE.
So that the precedence should be, from weakest to strongest

  1. TASK_SILENT_MODE
  2. taskfile:silent
  3. taskfile:task.silent
  4. taskfile:task.cmds[*].silent
  5. -s/--silent / -S/--no-silent
  6. --dry-run - implies an overpowering silent:false
@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Jan 3, 2024
@FourteenBrush
Copy link

It would indeed be useful to override a silent: true at the root with a silent: false on a task level.

@mattrussell-sonocent
Copy link

It would indeed be useful to override a silent: true at the root with a silent: false on a task level.

+1 - I was confused that this didn't take precedence.

@vmaerten vmaerten added type: feature A new feature or functionality. and removed state: needs triage Waiting to be triaged by a maintainer. labels Jul 7, 2024
@pd93 pd93 removed the type: feature A new feature or functionality. label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants