- Notifications
You must be signed in to change notification settings - Fork899
Use a config filename that is different from the binary name#46
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This was causing issues in the Docker container, where viper looks for afilename, without considering the extension, resulting in it trying toparse the binary itself as JSON.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR addresses issues with viper misinterpreting the binary as a JSON config by changing the config filename.
- Updates the config name in the viper configuration to "github-mcp-server-config".
- Changes the JSON filename in the DumpTranslationKeyMap function to "github-mcp-server-config.json".
Comments suppressed due to low confidence (2)
pkg/translations/translations.go:27
- [nitpick] Consider defining a constant for the config name to avoid duplicating literal strings across the codebase.
v.SetConfigName("github-mcp-server-config")
pkg/translations/translations.go:64
- [nitpick] Consider using a constant for the config filename to maintain consistency and ease future changes.
file, err := os.Create("github-mcp-server-config.json")
Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused.Learn more
001a665
intomainUh oh!
There was an error while loading.Please reload this page.
This was causing issues in the Docker container, where viper looks for afilename, without considering the extension, resulting in it trying toparse the binary itself as JSON.
Uh oh!
There was an error while loading.Please reload this page.
Description
This was causing issues in the Docker container, where viper looks for a filename, without considering the extension, resulting in it trying to parse the binary itself as JSON:
There are probably more robust options out there, like looking in config dirs (XDG, if this was ever user installed) but this is the simplest path to fix the error.