INNER CODE UNIT · Go
loadArgoConfig
darksworm/argonaut · cmd/app/main.go:430
func loadArgoConfig(overridePath string) (*model.Server, error) {
// Read CLI config file (override path if specified)
var (
cfg *config.ArgoCLIConfig
err error
)
if overridePath != "" {
cfg, err = config.ReadCLIConfigFromPath(overridePath)
} else {
// Still respect ARGOCD_CONFIG environment variable via ReadCLIConfig()
cfg, err = config.ReadCLIConfig()
}
if err != nil {
return nil, fmt.Errorf("failed to read CLI config: %w", err)
}
// Check if port-forward mode is configured
if isPortForward, pfErr := cfg.IsPortForwardMode(); pfErr == nil && isPortForward {