Skip to content

Commit eaffe47

Browse files
author
Bruce Hill
committed
Only clear screen for preview when the --watch flag is used
1 parent f43be33 commit eaffe47

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pkg/cmd/dev.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,11 @@ var devCommand = cli.Command{
315315
}
316316

317317
func runPreview(ctx context.Context, cmd *cli.Command) error {
318-
// Clear the screen and move the cursor to the top
319-
fmt.Print("\033[2J\033[H")
320-
os.Stdout.Sync()
318+
if cmd.Bool("watch") {
319+
// Clear the screen and move the cursor to the top
320+
fmt.Print("\033[2J\033[H")
321+
os.Stdout.Sync()
322+
}
321323

322324
cc := getAPICommandContext(cmd)
323325

0 commit comments

Comments
 (0)