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 the problem of a better description when no component is listed during update #374

Merged
merged 1 commit into from
Apr 19, 2018

Conversation

mik-dass
Copy link
Contributor

Signed-off-by: mik-dass mrinald7@gmail.com
Issue : #319

@mik-dass
Copy link
Contributor Author

@kadel Are the error messages appropriate?

cmd/update.go Outdated
fmt.Println("Cannot update as no application is set as active")
os.Exit(1)
}
}
} else {
componentName = args[0]
}
Copy link
Member

Choose a reason for hiding this comment

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

You should also check if component exists

cmd/update.go Outdated
fmt.Println("Cannot update as no application exists in the current project")
os.Exit(1)
}
applicationName, err = application.GetCurrent(client)
Copy link
Member

Choose a reason for hiding this comment

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

you are already calling application.GetCurrent(client) on line 32

@mik-dass
Copy link
Contributor Author

@kadel Done

cmd/update.go Outdated
os.Exit(1)
}

exists, err := component.Exists(client, componentName, applicationName, projectName)
Copy link
Member

Choose a reason for hiding this comment

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

you should move this check to else block after line 73

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kadel Done

…s listed during update

This checks if any app exists in the current project or	any app is set as active or not

Signed-off-by: mdas <mrinald7@gmail.com>
@surajnarwade
Copy link
Contributor

surajnarwade commented Apr 18, 2018

works for me, LGTM :)

@kadel kadel merged commit 3631e4a into redhat-developer:master Apr 19, 2018
@mik-dass mik-dass deleted the no_active_comp branch April 24, 2018 10:57
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.

3 participants