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

feat: Show spinner animation when adding plugins #8234

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 11 additions & 9 deletions src/meltano/cli/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import click
import requests
from yaspin import yaspin

from meltano.cli.params import pass_project
from meltano.cli.utils import (
Expand Down Expand Up @@ -198,16 +199,17 @@ def add( # noqa: WPS238
tracker.track_command_event(CliEvent.inflight)

if not flags.get("no_install"):
success = install_plugins(
project,
plugins,
reason=PluginInstallReason.ADD,
force=flags.get("force_install", False),
)
with yaspin(color="blue"):
success = install_plugins(
project,
plugins,
reason=PluginInstallReason.ADD,
force=flags.get("force_install", False),
)

if not success:
tracker.track_command_event(CliEvent.failed)
raise CliError("Failed to install plugin(s)")
if not success:
tracker.track_command_event(CliEvent.failed)
raise CliError("Failed to install plugin(s)")

_print_plugins(plugins)
tracker.track_command_event(CliEvent.completed)
Expand Down