mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-10 15:00:31 +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)
|
script, err := misc.ReadScriptFile(event.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Send()
|
log.Error().Err(err).Send()
|
||||||
return
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
index, err := connector.PostScript(script)
|
index, err := connector.PostScript(script)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Send()
|
log.Error().Err(err).Send()
|
||||||
return
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
files[script.Path] = index
|
files[script.Path] = index
|
||||||
@@ -110,13 +110,13 @@ func watchScripts(block bool) {
|
|||||||
script, err := misc.ReadScriptFile(event.Name)
|
script, err := misc.ReadScriptFile(event.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Send()
|
log.Error().Err(err).Send()
|
||||||
return
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
err = connector.PutScript(script, index)
|
err = connector.PutScript(script, index)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Send()
|
log.Error().Err(err).Send()
|
||||||
return
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
case fsnotify.Rename:
|
case fsnotify.Rename:
|
||||||
@@ -124,7 +124,7 @@ func watchScripts(block bool) {
|
|||||||
err := connector.DeleteScript(index)
|
err := connector.DeleteScript(index)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Send()
|
log.Error().Err(err).Send()
|
||||||
return
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user