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

Suppress signal received message #1621

Open
sedyh opened this issue Apr 26, 2024 · 3 comments
Open

Suppress signal received message #1621

sedyh opened this issue Apr 26, 2024 · 3 comments

Comments

@sedyh
Copy link

sedyh commented Apr 26, 2024

Hello, I would like to be able to turn off stdout for a task using an option in the taskfile, I have not found such functionality or existing proposals.

It would be nice if silent not only did not output the command, but also did not write about received signals until it is stderr.

version: "3"

silent: true

tasks:
  app:
    cmds:
      - cmd: go build -ldflags="-X main.Version={{.VERSION}}" -o app ./cmd/app && ./app
        ignore_error: true
      - defer: rm -rf app
started
log
log
...
log
task: Signal received: "interrupt"
stopped
@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Apr 26, 2024
@pd93
Copy link
Member

pd93 commented Apr 26, 2024

I have thought about this in the past. It occurs to me that our silent actually works very similarly to other CLI's quiet (e.g. docker). I think that silent is somewhat of a misnomer.

I've considered opening a proposal for an experiment that will change the behaviour of silent to be actually silent as proposed here and to add a new quiet flag/field that will maintain the existing behaviour of silent.

However, there is definitely a balance to strike here between "fixing" these issues and limiting the number of changes a user needs to make to migrate their Taskfiles to any potential future major release.

@pd93 pd93 added type: feature A new feature or functionality. and removed state: needs triage Waiting to be triaged by a maintainer. labels Apr 26, 2024
@sedyh
Copy link
Author

sedyh commented Sep 1, 2024

Hello. Has anything similar been added recently? Can I make a PR for this?

@pd93 pd93 removed the type: feature A new feature or functionality. label Dec 16, 2024
@leaanthony
Copy link
Contributor

Sometimes you only care about the errors and the rest of the stuff is just noise. An option to display the stdout in the event of an error might be good too.

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

4 participants