Commit d66d0dc
authored
fix: rootCmd args parsed as directory path — breaks watch cache loading (#109)
* fix: rootCmd args parsed as directory path — breaks watch cache loading
rootCmd accepted MaximumNArgs(1) and used args[0] as the working
directory. Since watch is the default behavior on rootCmd (not a
subcommand), running `supermodel` with any trailing token would use
that token as the directory. This caused the daemon to create and
read from a wrong directory (e.g. ./watch/.supermodel/shards.json
instead of ./.supermodel/shards.json).
Fix: switch to NoArgs and add an explicit --dir flag. This matches
the pattern used by all other subcommands that accept a directory.
Fixes #108
* fix: remove stale [path] from Use string per CodeRabbit1 parent 161c66e commit d66d0dc
1 file changed
+5
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 71 | + | |
75 | 72 | | |
76 | 73 | | |
77 | 74 | | |
| |||
84 | 81 | | |
85 | 82 | | |
86 | 83 | | |
| 84 | + | |
87 | 85 | | |
88 | 86 | | |
89 | 87 | | |
| |||
92 | 90 | | |
93 | 91 | | |
94 | 92 | | |
| 93 | + | |
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
| |||
0 commit comments