Skip to content

Commit

Permalink
instance update: fixing no err check after creating client (#657)
Browse files Browse the repository at this point in the history
# Description
<!--
* Prefix: the title with the component name being changed. Add a short
and self describing sentence to ease the review
* Please add a few lines providing context and describing the change
* Please self comment changes whenever applicable to help with the
review process
* Please keep the checklist as part of the PR. Tick what applies to this
change.
-->

If we fail to create the client, this will result in a SIGSEV when using
it

## Checklist
(For exoscale contributors)

* [x] Changelog updated (under *Unreleased* block)
* [x] Testing

## Testing

<!--
Describe the tests you did
-->
  • Loading branch information
tgrondier authored Dec 13, 2024
1 parent a650819 commit 9bc7090
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Changelog

## Unreleased

### Bug fixes
- instance update: fixing no err check after creating client #657

## 1.82.0

### Features
Expand Down
3 changes: 3 additions & 0 deletions cmd/instance_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ func (c *instanceUpdateCmd) cmdRun(cmd *cobra.Command, _ []string) error {
if cmd.Flags().Changed(mustCLICommandFlagName(c, &c.Protection)) {
var client *v3.Client
client, err = switchClientZoneV3(ctx, globalstate.EgoscaleV3Client, v3.ZoneName(c.Zone))
if err != nil {
return
}

var instanceID v3.UUID
var op *v3.Operation
Expand Down

0 comments on commit 9bc7090

Please sign in to comment.