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

Log process stdout/stderr by default #843

Open
2 tasks
matejchalk opened this issue Oct 15, 2024 · 0 comments
Open
2 tasks

Log process stdout/stderr by default #843

matejchalk opened this issue Oct 15, 2024 · 0 comments

Comments

@matejchalk
Copy link
Collaborator

Context: #839 (comment)

Currently, executeProcess doesn't print stdout and stderr, but only returns the texts to the caller. If there is non-zero exit code and ignoreExitCode: true isn't set, then error is thrown with the stderr text in its message. Otherwise it is entirely up to the caller to print the process logs.

We could add a flag to toggle if process logs are printed, which would be less boilerplate than setting a custom observer object.
The question if logs should be printed by default or not. These logs would help with debugging, but could also be excessive in some cases.

  • If logs should not be printed by default, then we can add a verbose flag.
  • If logs should be printed by default, then we can add a silent flag (similarly to @actions/exec.
    • We could also connect executeProcess's silent flag with the CLI's --verbose option (silent: !verbose).

Acceptance critera

  • analyze executeProcess in the codebase and decide if verbose or silent would be more appropriate (do we usually want to print logs or not?)
  • implement new flag and update usage where appropriate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant