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

Disable tk client setup if an --help flag is present #231

Merged
merged 1 commit into from
Aug 5, 2020
Merged

Disable tk client setup if an --help flag is present #231

merged 1 commit into from
Aug 5, 2020

Conversation

gianarb
Copy link
Contributor

@gianarb gianarb commented Aug 5, 2020

Description

An up and running Tinkerbell Server should not be a requirement for the
help command to work.

This is a bit tricky because our client is globally instantiated as part
of the root command.

I made it to work for:

Previously the command returned 2020/06/08 11:16:25 undefined TINKERBELL_CERT_URL. Now it returns the help command.

Why is this needed

Fixed #164

How Has This Been Tested?

Run command:

$ ./cmd/tink-cli/tink-cli workflow --help

How are existing users impacted? What migration steps/scripts do we need?

They will get as output the helper of the command and not an error.

An up and running Tinkerbell Server should not be a requirement for the
`help` command to work.

This is a bit tricky because our client is globally instantiated as part
of the root command.

I made it to work for:

```
$ ./cmd/tink-cli/tink-cli workflow --help
```

Previously the command returned `2020/06/08 11:16:25 undefined
TINKERBELL_CERT_URL`. Now it returns the help command.

I think this should work the same way, but it is hard to do, so I am
skipping it for now.
```
$ ./cmd/tink-cli/tink-cli workflow
```

Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
Copy link
Contributor

@invidian invidian left a comment

Choose a reason for hiding this comment

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

Seems OK. Thanks!

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 too.

@gauravgahlot gauravgahlot added this to In Progress in Issues List via automation Aug 5, 2020
@gauravgahlot gauravgahlot added the ready-to-merge Signal to Mergify to merge the PR. label Aug 5, 2020
@mergify mergify bot merged commit 13a86f9 into tinkerbell:master Aug 5, 2020
Issues List automation moved this from In Progress to Just shipped Aug 5, 2020
@mmlb mmlb removed the ready-to-merge Signal to Mergify to merge the PR. label Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Issues List
  
Just shipped
Development

Successfully merging this pull request may close these issues.

'tink-cli workflow --help' does not work without running Tinkerbell
4 participants