getEnvFilePath retorna o caminho do arquivo .env configurado (expandido).
()
| 411 | |
| 412 | // getEnvFilePath retorna o caminho do arquivo .env configurado (expandido). |
| 413 | func (cli *ChatCLI) getEnvFilePath() string { |
| 414 | envFilePath := os.Getenv("CHATCLI_DOTENV") |
| 415 | if envFilePath == "" { |
| 416 | envFilePath = ".env" |
| 417 | } |
| 418 | expanded, err := utils.ExpandPath(envFilePath) |
| 419 | if err != nil { |
| 420 | cli.logger.Warn("Não foi possível expandir o caminho do .env", zap.Error(err)) |
| 421 | return envFilePath // Retorna o original se falhar |
| 422 | } |
| 423 | return expanded |
| 424 | } |
| 425 | |
| 426 | func (ch *CommandHandler) handleVersionCommand(ctx context.Context) { |
| 427 | versionInfo := version.GetCurrentVersion() |
no test coverage detected