Fix noinlineerr findings: internal/cli (refs #61)

This commit is contained in:
2026-08-07 16:59:56 +00:00
parent 26909b058a
commit 2f7e37153c
6 changed files with 46 additions and 21 deletions

View File

@@ -75,7 +75,8 @@ func GetRootFlags() RootFlags {
// so the user gets a clear error instead of a downstream YAML parser failure.
func ResolveConfigPath() (string, error) {
if path := rootFlags.ConfigPath; path != "" {
if _, err := os.Stat(path); err != nil {
_, err := os.Stat(path)
if err != nil {
return "", fmt.Errorf("config file from --config not found: %s (run 'vaultik config init --config %s' to create it)", path, path)
}
@@ -91,7 +92,8 @@ func ResolveConfigPath() (string, error) {
}
for _, path := range defaultConfigPaths() {
if _, err := os.Stat(path); err == nil {
_, err := os.Stat(path)
if err == nil {
return path, nil
}
}