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

fix panic resolver's configuration file does not have read permission #163

Merged
merged 1 commit into from
Apr 14, 2021

Conversation

zbindenren
Copy link
Contributor

Without this fix you get the following panic when a resolver's file is not readable:

command --help
panic: ~/.config/command/config.yaml: open /home/user/.config/command/config.yaml: permission denied

goroutine 1 [running]:
github.com/alecthomas/kong.Parse(0xacf6c0, 0xc0000b8900, 0xc0000b0300, 0x8, 0x8, 0x22)
        /home/rz/golang/pkg/mod/github.com/alecthomas/kong@v0.2.16/global.go:11 +0x145
main.main()

The easiest way for read permission is via os.Open

options.go Show resolved Hide resolved
@alecthomas
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants