From e14bc8064ba09acc70ff561748fd38afff24ff36 Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Fri, 24 Mar 2023 02:58:49 +0300 Subject: [PATCH] :bug: Don't stop watching in case of an error occurs in `scripts` command --- cmd/scripts.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/scripts.go b/cmd/scripts.go index b17a15f52..29d30632a 100644 --- a/cmd/scripts.go +++ b/cmd/scripts.go @@ -94,13 +94,13 @@ func watchScripts(block bool) { script, err := misc.ReadScriptFile(event.Name) if err != nil { log.Error().Err(err).Send() - return + continue } index, err := connector.PostScript(script) if err != nil { log.Error().Err(err).Send() - return + continue } files[script.Path] = index @@ -110,13 +110,13 @@ func watchScripts(block bool) { script, err := misc.ReadScriptFile(event.Name) if err != nil { log.Error().Err(err).Send() - return + continue } err = connector.PutScript(script, index) if err != nil { log.Error().Err(err).Send() - return + continue } case fsnotify.Rename: @@ -124,7 +124,7 @@ func watchScripts(block bool) { err := connector.DeleteScript(index) if err != nil { log.Error().Err(err).Send() - return + continue } default: