Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
williammartin merged 1 commit intomainfromwm/fix-viper-config
Mar 28, 2025

Conversation

williammartin
Copy link
Collaborator

@williammartinwilliammartin commentedMar 28, 2025
edited
Loading

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:

➜ github-mcp-server git:(main) ✗ docker run -itt -e GITHUB_PERSONAL_ACCESS_TOKEN=foo github/github-mcp-server2025/03/28 10:04:19 Could not read JSON config: While parsing config: invalid character '\x7f' looking for beginning of value

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.

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.
@CopilotCopilotAI review requested due to automatic review settingsMarch 28, 2025 10:19
Copy link
Contributor

@CopilotCopilotAI left a 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

@williammartinwilliammartin merged commit001a665 intomainMar 28, 2025
13 checks passed
manian0430 pushed a commit to ChrisLally/github-mcp-server that referenced this pull requestApr 12, 2025
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.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@juruenjuruenjuruen approved these changes

@SamMorrowDrumsSamMorrowDrumsSamMorrowDrums approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@williammartin@juruen@SamMorrowDrums

[8]ページ先頭

©2009-2025 Movatter.jp