diff --git a/pkg/watch/watch.go b/pkg/watch/watch.go index 4b45ee1160c..e5c6bb3ccd4 100644 --- a/pkg/watch/watch.go +++ b/pkg/watch/watch.go @@ -475,7 +475,7 @@ func processEvents( if oldStatus.State != StateReady && componentStatus.State == StateReady || !reflect.DeepEqual(oldStatus.EndpointsForwarded, componentStatus.EndpointsForwarded) { - printInfoMessage(out, parameters.Path) + printInfoMessage(out, parameters.Path, parameters.WatchFiles) } return nil, nil } @@ -544,9 +544,22 @@ func removeDuplicates(input []string) []string { return result } -func printInfoMessage(out io.Writer, path string) { +func printInfoMessage(out io.Writer, path string, watchFiles bool) { log.Sectionf("Dev mode") - fmt.Fprintf(out, " %s\n Watching for changes in the current directory %s\n\n %s%s", log.Sbold("Status:"), path, log.Sbold("Keyboard Commands:"), PromptMessage) + if watchFiles { + fmt.Fprintf( + out, + " %s\n Watching for changes in the current directory %s\n\n", + log.Sbold("Status:"), + path, + ) + } + fmt.Fprintf( + out, + " %s%s", + log.Sbold("Keyboard Commands:"), + PromptMessage, + ) } func isFatal(err error) bool { diff --git a/tests/helper/helper_dev.go b/tests/helper/helper_dev.go index 00d009b38b0..aa778db7f74 100644 --- a/tests/helper/helper_dev.go +++ b/tests/helper/helper_dev.go @@ -193,7 +193,7 @@ func (o DevSession) WaitEnd() { // since the end of the dev mode or the last time WaitSync/GetInfo has been called func (o DevSession) WaitSync() ([]byte, []byte, map[string]string, error) { WaitForOutputToContainOne([]string{"Pushing files...", "Updating Component..."}, 180, 10, o.session) - WaitForOutputToContain("Watching for changes in the current directory", 240, 10, o.session) + WaitForOutputToContain("Dev mode", 240, 10, o.session) return o.GetInfo() }