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

Enable root-level help message #75

Merged

Conversation

alexellis
Copy link
Contributor

@alexellis alexellis commented Apr 23, 2020

Signed-off-by: Alex Ellis (OpenFaaS Ltd) [email protected]

Testing:

space-mini:tink alex$ go build && ./tink --help
tinkerbell CLI

Usage:
  tink [command]

Available Commands:
  hardware    tink hardware client
  help        Help about any command
  target      tink target client
  template    tink template client
  workflow    tink workflow client

Flags:
  -f, --facility string   used to build grcp and http urls
  -h, --help              help for tink

Use "tink [command] --help" for more information about a command.
space-mini:tink alex$ go build && ./tink workflow
2020/04/23 11:14:45 undefined TINKERBELL_CERT_URL

@gauravgahlot PTAL?

* enables --help and no arguments to show the help message
* fixes a CLI issue described in: !68
* corrects error so that it's printed to stderr, instead of
stdout. stdout is used for success messages in POSIX programs

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
Both the CLI and the main server are built as "tink" and this
is not part of the gitignore file so risks them being
comitted to git and bloating the repo.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
@gauravgahlot gauravgahlot linked an issue Apr 23, 2020 that may be closed by this pull request
Copy link
Contributor

@gauravgahlot gauravgahlot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gauravgahlot gauravgahlot merged commit a517ca9 into tinkerbell:master Apr 23, 2020
mmlb added a commit to mmlb/tinkerbell-tink that referenced this pull request Apr 23, 2020
PR tinkerbell#75 added --help support, but missed -h.

Signed-off-by: Manuel Mendez <[email protected]>
parauliya pushed a commit to infracloudio/tink that referenced this pull request May 5, 2020
PR tinkerbell#75 added --help support, but missed -h.

Signed-off-by: Manuel Mendez <[email protected]>
mmlb added a commit to mmlb/tinkerbell-tink that referenced this pull request May 21, 2020
PR tinkerbell#75 added --help support, but missed -h.

Signed-off-by: Manuel Mendez <[email protected]>
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.

Make --help work without environment variables set
2 participants