summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-09-28 17:49:54 +0300
committerPaul Buetow <paul@buetow.org>2025-09-28 17:50:59 +0300
commit9cae3b4218184d32033498c6b4ddc43959046cdf (patch)
tree204a66ecf96ee33f9abc87677a0b4cddf3caf641 /cmd
parent0761409497041c752086b9aded08cf9e32e30fd2 (diff)
Propagate --config overrides through CLI tools and LSP reloads
Diffstat (limited to 'cmd')
-rw-r--r--cmd/hexai/main.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/cmd/hexai/main.go b/cmd/hexai/main.go
index a6fc1a6..33b0365 100644
--- a/cmd/hexai/main.go
+++ b/cmd/hexai/main.go
@@ -52,13 +52,17 @@ func main() {
selection = append(selection, i)
}
}
+ finalPath := strings.TrimSpace(*configFlag)
+ if finalPath == "" {
+ finalPath = configPath
+ }
ctx := context.Background()
+ if finalPath != "" {
+ ctx = hexaicli.WithCLIConfigPath(ctx, finalPath)
+ }
if len(selection) > 0 {
ctx = hexaicli.WithCLISelection(ctx, selection)
}
- if path := strings.TrimSpace(*configFlag); path != "" {
- ctx = hexaicli.WithCLIConfigPath(ctx, path)
- }
if err := hexaicli.Run(ctx, fs.Args(), os.Stdin, os.Stdout, os.Stderr); err != nil {
os.Exit(1)
}