Skip to content

Commit

Permalink
fix(framework) Suppress output when in JSON format for flwr ls (#4734)
Browse files Browse the repository at this point in the history
  • Loading branch information
chongshenng authored Dec 17, 2024
1 parent 6eeb98a commit b214ab9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/py/flwr/cli/ls.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ def ls( # pylint: disable=too-many-locals, too-many-branches
try:
if suppress_output:
redirect_output(captured_output)

# Load and validate federation config
typer.secho("Loading project configuration... ", fg=typer.colors.BLUE)

Expand Down Expand Up @@ -132,6 +131,8 @@ def ls( # pylint: disable=too-many-locals, too-many-branches
_list_runs(stub, output_format)

except ValueError as err:
if suppress_output:
redirect_output(captured_output)
typer.secho(
f"❌ {err}",
fg=typer.colors.RED,
Expand Down

0 comments on commit b214ab9

Please sign in to comment.