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(cli): non-interactive should not run daily version check #462

Merged
merged 1 commit into from
Jul 2, 2021

Conversation

afiune
Copy link
Contributor

@afiune afiune commented Jun 29, 2021

If a user is running in non-interactive mode, the Lacework CLI should avoid
the daily version check feature.

JIRA: https://lacework.atlassian.net/browse/ALLY-551

Signed-off-by: Salim Afiune Maya [email protected]

@afiune afiune added bug Something isn't working cli Something related to the Lacework CLI labels Jun 29, 2021
@afiune afiune requested a review from a team June 29, 2021 22:32
@afiune afiune self-assigned this Jun 29, 2021
@afiune afiune force-pushed the afiune/ALLY-551/cli-noninteractive branch from daed6d3 to 808d250 Compare June 29, 2021 22:39
@@ -216,7 +216,7 @@ func (c *cliState) NewClient() error {

// InteractiveMode returns true if the cli is running in interactive mode
func (c *cliState) InteractiveMode() bool {
return !c.nonInteractive && !c.csvOutput
return !c.nonInteractive && !c.csvOutput && !c.jsonOutput
Copy link
Collaborator

@dmurray-lacework dmurray-lacework Jun 30, 2021

Choose a reason for hiding this comment

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

This is kind of a different task than what this ticket intended. I think it's correct(non-interactive when --json flag is set), but i'd maybe consider either adding more tests for this use case or moving it out of this PR.

Copy link
Collaborator

@dmurray-lacework dmurray-lacework left a comment

Choose a reason for hiding this comment

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

Looks good, just a comment on adding the json check along side this change.

@afiune afiune merged commit 4bb7e9f into main Jul 2, 2021
@afiune afiune deleted the afiune/ALLY-551/cli-noninteractive branch July 2, 2021 15:45
@lacework-releng lacework-releng mentioned this pull request Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Something related to the Lacework CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants