♻️ Default cmdtestgen output to command-test.sh

This commit is contained in:
OpenWaygate committed 2026-06-21 01:49:46 +08:00
1 parent ee7b633c98
commit 4cb0fa4f76
1 file changed
+1 -6
+1 -6
View File
@@ -161,16 +161,11 @@ func generate() string {
}
func main() {
out := flag.String("out", "", "output file (default: stdout)")
out := flag.String("out", "./scripts/command-test.sh", "output file")
flag.Parse()
content := generate()
if *out == "" {
fmt.Print(content)
return
}
if err := os.WriteFile(*out, []byte(content), 0o755); err != nil {
log.Fatalf("write %s: %v", *out, err)
}