From 3a979da8153804dd0623a7c567ff4e14a23e62f7 Mon Sep 17 00:00:00 2001 From: Anuruth Lertpiya Date: Sat, 27 Sep 2025 17:03:54 +0000 Subject: [PATCH] fix: llamactl reads config file per documentation - Added logging to track config file reading operations - llamactl now properly reads config files from the expected locations ("llamactl.yaml" and "config.yaml" under current directory) --- pkg/config/config.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/config/config.go b/pkg/config/config.go index cf6f9cf..9cb80e1 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -1,6 +1,7 @@ package config import ( + "log" "os" "path/filepath" "runtime" @@ -216,6 +217,7 @@ func loadConfigFile(cfg *AppConfig, configPath string) error { if err := yaml.Unmarshal(data, cfg); err != nil { return err } + log.Printf("Read config at %s", path) return nil } } @@ -475,6 +477,10 @@ func getDefaultDataDirectory() string { // getDefaultConfigLocations returns platform-specific config file locations func getDefaultConfigLocations() []string { var locations []string + // Use ./llamactl.yaml and ./config.yaml as the default config file + locations = append(locations, "llamactl.yaml") + locations = append(locations, "config.yaml") + homeDir, _ := os.UserHomeDir() switch runtime.GOOS {