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

re-enable and color dot spinner for non-interactive mode #8996

Merged
merged 7 commits into from
Feb 15, 2022

Conversation

dixler
Copy link
Contributor

@dixler dixler commented Feb 15, 2022

Description

The non-interactive dot spinner functionality was not being triggered due to Interactive == true checks in calling functions.

also added color to match the output style

Fixes #6574

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • Yes, there are changes in this PR that warrants bumping the Pulumi Service API version

@dixler dixler changed the title re-enabled dot spinner for non-interactive mode re-enable and color dot spinner for non-interactive mode Feb 15, 2022
@dixler dixler requested a review from pgavlin February 15, 2022 18:24
Copy link
Member

@Frassle Frassle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question out of curiosity, but looks fine.

prefix string
hasWritten bool
}

func (spin *dotSpinner) Tick() {
if !spin.hasWritten {
fmt.Print(spin.prefix)
fmt.Print(spin.color.Colorize(colors.Yellow + spin.prefix))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why yellow? Does that match something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@susanev suggested it to help contrast from resource creations in white.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should probably add a reset here and then manually color it inside the printf down here just in case things get interrupted and we mess up a terminal

@dixler dixler merged commit 6a8f7be into master Feb 15, 2022
@pulumi-bot pulumi-bot deleted the dixler/6574/dotspinner branch February 15, 2022 22:37
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.

Produce console output while waiting for slow-to-create resources
3 participants