Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in File Search #1988

Open
3 tasks done
rishavch2104 opened this issue Mar 1, 2025 · 2 comments
Open
3 tasks done

Bug in File Search #1988

rishavch2104 opened this issue Mar 1, 2025 · 2 comments
Labels
kind/bug Something isn't working

Comments

@rishavch2104
Copy link

rishavch2104 commented Mar 1, 2025

Preflight Checklist

  • I have searched the issue tracker for an issue that matches the one I want to file, without success.
  • I am not looking for support or already pursued the available support channels without success.
  • I have checked the troubleshooting guide for my problem, without success.

Viper Version

1.19.0

Go Version

1.23.5

Config Source

Flags

Format

YAML

Repl.it link

No response

Code reproducing the issue

viper.SetConfigName("testfile")
viper.SetConfigType("yaml")
viper.AddConfigPath("/dir/dir2/testfile")

Expected Behavior

When searching if file exists, file path should only be searched with list of available extension and custom extension if provided in config.

Actual Behavior

In line 86 in file.go , extension is not added while checking exists so incorrect files will be matched.

Steps To Reproduce

No response

Additional Information

No response

@rishavch2104
Copy link
Author

rishavch2104 commented Mar 1, 2025

Fixed in #1990

@rishavch2104
Copy link
Author

@sagikazarmark can you please check this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant