From 2b889baa5e14062b408437726da9c7f526c68c45 Mon Sep 17 00:00:00 2001 From: skshetry <18718008+skshetry@users.noreply.github.com> Date: Thu, 9 Mar 2023 16:10:46 +0545 Subject: [PATCH] plots: avoid printing anything on --json output (#9144) --- dvc/commands/plots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dvc/commands/plots.py b/dvc/commands/plots.py index 02adba8ca..5fca3e78b 100644 --- a/dvc/commands/plots.py +++ b/dvc/commands/plots.py @@ -112,7 +112,7 @@ class CmdPlots(CmdBase): props=self._props(), ) - if not plots_data: + if not plots_data and not self.args.json: ui.error_write( "No plots were loaded, visualization file will not be created." )