diff --git a/scripts/build-windows/kcl.go b/scripts/build-windows/kcl.go index 1f6faac82..076b9e322 100644 --- a/scripts/build-windows/kcl.go +++ b/scripts/build-windows/kcl.go @@ -20,7 +20,9 @@ func main() { args = append(args, "version") } else { args = append(args, "run") - args = append(args, os.Args[1:]...) + if len(os.Args) >= 1 { + args = append(args, os.Args[1:]...) + } } os.Exit(KclvmCliMain(args))