diff --git a/tools/watch/api.go b/tools/watch/api.go index 463bcce5b..bf9839bfd 100644 --- a/tools/watch/api.go +++ b/tools/watch/api.go @@ -178,10 +178,13 @@ func EntryPoint(root *cli.Command) { if err != nil { return 1, err } - debounce_time_ms, err := strconv.ParseUint(args[1], 10, 64) + debounce_time_ms, err := strconv.Atoi(args[1]) if err != nil { return 1, err } + if debounce_time_ms < 0 { + return 0, fmt.Errorf("debounce_time must be >= 0") + } config_paths := utils.Map(resolve_path, args[2:]) if err = watch_for_kitty_config_changes( func() error { return signal_kitty_to_reload_config(kitty_pid) },