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

replace tput with a safe_tput function #129

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

jazzsequence
Copy link
Contributor

@jazzsequence jazzsequence commented Jun 25, 2024

This PR fixes a bug that appears in Workflow logs in the Pantheon dashboard.

Screenshot 2024-06-25 at 10 12 28 AM

The terminal environment used to render the workflow logs does not support tput and does not have a $TERM value, so setting the colors at the top of helpers.sh throws errors.

The safe_tput function allows tput to be used on systems that support it but does not error if tput is not available. In the cases when this is running (e.g. in Workflow logs) the colors are not really important and are only used when the symlinks are being created during composer install.

This PR also adds a git push after the Sage theme is built and installed because the script waits for an operation (e.g. sync_code) that isn't actually running. This is likely something that was removed but we still have the workflow:wait command in place.

allows tput to be used on systems that support it but does not error if tput is not available
@jazzsequence jazzsequence marked this pull request as ready for review June 25, 2024 16:40
@jazzsequence jazzsequence requested review from a team as code owners June 25, 2024 16:40
we're unnecessarily waiting because we never actually pushed anything
private/scripts/helpers.sh Outdated Show resolved Hide resolved
@jazzsequence jazzsequence requested a review from pwtyler June 25, 2024 17:17
@jazzsequence jazzsequence changed the base branch from main to default June 25, 2024 18:20
@jazzsequence jazzsequence merged commit 0de23dd into default Jun 25, 2024
11 checks passed
@jazzsequence jazzsequence deleted the fix-tput-output-in-workflow-logs branch June 25, 2024 18:21
jazzsequence added a commit that referenced this pull request Jul 31, 2024
* replaces tput with a safe_tput function
allows tput to be used on systems that support it but does not error if tput is not available

* add a git push after the sage theme is built and installed
we're unnecessarily waiting because we never actually pushed anything

* remove ||
jazzsequence added a commit that referenced this pull request Aug 1, 2024
* replaces tput with a safe_tput function
allows tput to be used on systems that support it but does not error if tput is not available

* add a git push after the sage theme is built and installed
we're unnecessarily waiting because we never actually pushed anything

* remove ||
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