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

Improve output utils for warnings, steps and indented output #1666

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Oct 23, 2024

  • Switches warnings to the same approach used for errors (which also adds colour)
  • Switches to the new style utils for steps + indentation
  • Removes usage of the exec 1>&2 pattern since it breaks the output returned by Bash functions, amongst other issues.

GUS-W-17048951.

@edmorley edmorley self-assigned this Oct 23, 2024
* Switches warnings to the same approach used for errors
  (which also adds colour)
* Switches to the new style utils for steps + indentation
* Removes usage of the `exec 1>&2` pattern since it breaks
  the output returned by Bash functions, amongst other issues.

GUS-W-17048951.
@edmorley edmorley marked this pull request as ready for review October 23, 2024 14:00
@edmorley edmorley requested a review from a team as a code owner October 23, 2024 14:00
@edmorley edmorley enabled auto-merge (squash) October 23, 2024 14:01
@edmorley edmorley merged commit f03ed3f into main Oct 23, 2024
8 checks passed
@edmorley edmorley deleted the refactor-output-utils branch October 23, 2024 14:10
edmorley added a commit that referenced this pull request Oct 25, 2024
In #1666 the API for `output::error` was simplified, such that it
only supports the message being passed via stdin (since that's
the pattern used when passing a multi-line HERE-doc, and we
want to encourage detailed error messages).

However, there were a couple of remaining instances not switched
over to the stdin API.

These usages are in codepaths that cannot be tested via integration
tests since they are unreachable unless there was an internal
buildpack bug. (And Shellcheck also didn't spot these instances of
unconsumed passed args.)

GUS-W-17048951.
@heroku-linguist heroku-linguist bot mentioned this pull request Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants