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

The command --version only works if the config.yml file exist #119

Closed
Th0masL opened this issue Sep 6, 2021 · 1 comment
Closed

The command --version only works if the config.yml file exist #119

Th0masL opened this issue Sep 6, 2021 · 1 comment

Comments

@Th0masL
Copy link

Th0masL commented Sep 6, 2021

It's not a big problem, but it seems like the command --version only works from a folder where there's a config.yml file (even empty).

# Show folder content
root@prometheus:/tmp/json_exporter-0.3.0.darwin-amd64# ls
LICENSE
json_exporter

# Try to show the version
root@prometheus:/tmp/json_exporter-0.3.0.darwin-amd64# ./json_exporter --version
json_exporter: error: path 'config.yml' does not exist, try --help

# Create an empty config.yml file
root@prometheus:/tmp/json_exporter-0.3.0.darwin-amd64# touch config.yml

# Try to show the version
root@prometheus:/tmp/json_exporter-0.3.0.darwin-amd64# ./json_exporter --version
json_exporter, version 0.3.0 (branch: HEAD, revision: ae58e1f3e7161fb2a2a90a16998db0c072e2d532)
  build user:       root@46db6777a64c
  build date:       20210214-02:17:04
  go version:       go1.15.8
  platform:         linux/amd64
@rustycl0ck
Copy link
Member

This is a known issue in the kingpin.v2 library - alecthomas/kingpin#261

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

No branches or pull requests

2 participants