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

Only use a spinner on a tty #409

Merged
merged 1 commit into from
Dec 5, 2024
Merged

Only use a spinner on a tty #409

merged 1 commit into from
Dec 5, 2024

Conversation

sj26
Copy link
Member

@sj26 sj26 commented Dec 5, 2024

I tried to use bk to push a package from GitHub Actions, but it failed:

https://github.com/sj26/github-actions-to-buildkite-packages-javascript-example/actions/runs/12133880719/job/33830150889#step:5:8

Screenshot 2024-12-05 at 11 52 33 AM

Pretty sure that message comes via spinErr. I think it's because it's trying to start spinner, and that seems to require a tty.

This wraps up the spinner a little function that checks if we're in a tty when starting a spinner, and skips the spinner if we're not.

I haven't attempted tests yet .. I just wanted to see if this works.

I did test this locally and could still push a package and it showed a spinner. I couldn't figure out quickly how to simulate a no-tty environment.

Otherwise this command fails with errors about missing a tty when used
in scripts on CI.
@sj26 sj26 self-assigned this Dec 5, 2024
@sj26 sj26 merged commit b7388db into main Dec 5, 2024
1 check passed
@sj26 sj26 deleted the only-spinner-when-tty branch December 5, 2024 01:06
@sj26
Copy link
Member Author

sj26 commented Dec 5, 2024

Sadly this doesn't seem to have fixed my issue 😢

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