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." )