Skip to content

Commit 123a115

Browse files
committed
Make kitten main re-useable
1 parent 6282a46 commit 123a115

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tools/cmd/main.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"kitty/tools/cmd/tool"
1212
)
1313

14-
func main() {
14+
func KittenMain(args ...string) {
1515
krm := os.Getenv("KITTY_KITTEN_RUN_MODULE")
1616
os.Unsetenv("KITTY_KITTEN_RUN_MODULE")
1717
switch krm {
@@ -31,5 +31,9 @@ func main() {
3131
tool.KittyToolEntryPoints(root)
3232
completion.EntryPoint(root)
3333

34-
root.Exec()
34+
root.Exec(args...)
35+
}
36+
37+
func main() {
38+
KittenMain()
3539
}

0 commit comments

Comments
 (0)