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

Command logs #842

Merged
merged 4 commits into from
Jan 16, 2023
Merged

Command logs #842

merged 4 commits into from
Jan 16, 2023

Conversation

godrei
Copy link
Contributor

@godrei godrei commented Jan 13, 2023

Checklist

Version

Requires a PATCH version update

Context

This PR fixes a bug with structured logging: before Bitrise CLI installs an apt-get package, an apt-get update command is executed, which was writing to the os.Stdout directly. This resulted in a raw log, even if structured logging was enabled (--output-format json)

Changes

  • Hide the apt-get update command output as long as the command succeeds, return the output as part of the returned error otherwise
  • Stop CheckProgramInstalledPath to print to os.Stderr
  • Typo fix: longer -> logger

Investigation details

I was searching for os.Stdout and os.Stderr in the codebase to find all the occurrences where we write directly to the standard output.

@godrei godrei merged commit d075275 into master Jan 16, 2023
@godrei godrei deleted the command-logs branch January 16, 2023 09:56
@godrei godrei mentioned this pull request Jan 16, 2023
2 tasks
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

Successfully merging this pull request may close these issues.

2 participants