Skip to content

Small flag rename, add ssm-session flag validation#35

Merged
sendqueery merged 2 commits intov1from
session-checking
Aug 13, 2020
Merged

Small flag rename, add ssm-session flag validation#35
sendqueery merged 2 commits intov1from
session-checking

Conversation

@sendqueery
Copy link
Collaborator

Just want to get these merged in before I do a PR for the bigger stuff to trim things down a bit. :)

return maxErrors, nil
}

func validateSessionFlags(cmd *cobra.Command, instanceList []string, filterList map[string]string) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's either this or just --instance would get priority and --filter would be ignored.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd prefer to be explicit about it (as we are with validateRunFlags) so that users have a clear understanding of how the flags work. The reason we're making it fail is because passing instance IDs as well as filters will cause the AWS API to throw an error, and I think we should reflect that here.

@sendqueery sendqueery merged commit cf13c79 into v1 Aug 13, 2020
sendqueery added a commit that referenced this pull request Sep 3, 2020
* Small flag rename, add ssm-session flag validation

* Add test for validateSessionFlags()
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