Skip to content

Commit

Permalink
simplify return by omitting variable declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
mdb committed Aug 23, 2023
1 parent 536cd84 commit 64b3a3a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tfmigrate/state_replace_provider_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@ func (a *StateReplaceProviderAction) StateUpdate(ctx context.Context, tf tfexec.
// Disable unnecessary state backup here,
// because we never restore state from the backup generated by each state action.
// The state replace-provider command doesn't provide a way to disable it, so we backup to /dev/null.
newState, err := tf.StateReplaceProvider(ctx, state, a.source, a.destination, "-backup=/dev/null", "-auto-approve")
return newState, err
return tf.StateReplaceProvider(ctx, state, a.source, a.destination, "-backup=/dev/null", "-auto-approve")
}

0 comments on commit 64b3a3a

Please sign in to comment.