fix: error on empty input

This commit is contained in:
eneller
2025-10-26 10:43:01 +01:00
parent a54c005674
commit 6522fea34c

View File

@@ -117,7 +117,7 @@ func main() {
continue continue
} }
args, err := shlex.Split(scanner.Text()) args, err := shlex.Split(scanner.Text())
if err != nil { if err != nil || len(args) == 0 {
fmt.Fprintf(os.Stderr, "Error parsing command: %v\n", err) fmt.Fprintf(os.Stderr, "Error parsing command: %v\n", err)
continue continue
} }