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

Fixes #53 #54

Merged
merged 1 commit into from
May 27, 2020
Merged

Fixes #53 #54

merged 1 commit into from
May 27, 2020

Conversation

santiagoaldanondo
Copy link
Contributor

No description provided.

@santiagoaldanondo santiagoaldanondo linked an issue May 27, 2020 that may be closed by this pull request
cmd/enval.go Outdated
for _, err := range errs {
{
ok = false
prettyPrintError(err)
Copy link
Contributor

Choose a reason for hiding this comment

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

the info was already printed. This must just exit 1 without printing as soon as one is not valid

@@ -175,6 +175,20 @@ func (result *ToolValidationResult) NotParseableVersionOutputCommand(msg string)
return result
}

func (result *ToolValidationResult) CheckErrors() []error {
Copy link
Contributor

Choose a reason for hiding this comment

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

this function should be just IsValid returning result.IsToolAvailable && result.IsVersionValid && result.IsCommandVersionOutputParseable

@@ -40,6 +40,8 @@ const (
UnsupportedInputRawVersionEnvalErrorKind
FieldVersionKeyNotFoundEnvalErrorKind
InvalidCustomSpecsDirEnvalErrorKind
InvalidVersionErrorKind
Copy link
Contributor

Choose a reason for hiding this comment

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

not needed

@@ -40,6 +40,8 @@ const (
UnsupportedInputRawVersionEnvalErrorKind
FieldVersionKeyNotFoundEnvalErrorKind
InvalidCustomSpecsDirEnvalErrorKind
InvalidVersionErrorKind
CommandVersionOutputNonParseableErrorKind
Copy link
Contributor

Choose a reason for hiding this comment

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

not needed

@santiagoaldanondo santiagoaldanondo force-pushed the bugfix/exit-code branch 2 times, most recently from e7c50ef to 5267079 Compare May 27, 2020 13:35
@hrodes hrodes merged commit 7010d4e into master May 27, 2020
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.

Unexpected exit code when validation fails
2 participants