Skip to content

Commit 9fad448

Browse files
authored
Check if the flag was changed (#865)
1 parent 197ed3b commit 9fad448

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/cmd/cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func ParseEnv() Env {
8383
}
8484

8585
func getConfigPath(stderr io.Writer, f *pflag.Flag) (string, string) {
86-
if f != nil {
86+
if f != nil && f.Changed {
8787
file := f.Value.String()
8888
if file == "" {
8989
fmt.Fprintln(stderr, "error parsing config: file argument is empty")

0 commit comments

Comments
 (0)