-
Notifications
You must be signed in to change notification settings - Fork 243
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
Conversation
@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] | ||
} |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
cde3915
to
b126a50
Compare
@kadel Done |
cmd/update.go
Outdated
os.Exit(1) | ||
} | ||
|
||
exists, err := component.Exists(client, componentName, applicationName, projectName) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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>
b126a50
to
29dbb60
Compare
works for me, LGTM :) |
Signed-off-by: mik-dass mrinald7@gmail.com
Issue : #319