mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-10 06:50:54 +00:00
🐛 Don't stop watching in case of an error occurs in scripts
command
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user