Merge pull request #43 from BobbyL2k/fix/config-path

fix: llamactl reads config file per documentation
This commit is contained in:
2025-09-27 19:32:13 +02:00
committed by GitHub

View File

@@ -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 {