mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 08:21:07 -06:00
don't check diags for errors
This commit is contained in:
parent
4d749e2813
commit
37b7e6ebce
@ -253,9 +253,7 @@ func (c *ImportCommand) Run(args []string) int {
|
||||
if isCloudMode(b) {
|
||||
var schemaDiags tfdiags.Diagnostics
|
||||
schemas, schemaDiags = c.MaybeGetSchemas(newState, nil)
|
||||
if schemaDiags.HasErrors() {
|
||||
diags = diags.Append(schemaDiags)
|
||||
}
|
||||
diags = diags.Append(schemaDiags)
|
||||
}
|
||||
|
||||
// Persist the final state
|
||||
|
@ -398,9 +398,7 @@ func (c *StateMvCommand) Run(args []string) int {
|
||||
if isCloudMode(b) {
|
||||
var schemaDiags tfdiags.Diagnostics
|
||||
schemas, schemaDiags = c.MaybeGetSchemas(stateTo, nil)
|
||||
if schemaDiags.HasErrors() {
|
||||
diags = diags.Append(schemaDiags)
|
||||
}
|
||||
diags = diags.Append(schemaDiags)
|
||||
}
|
||||
|
||||
// Write the new state
|
||||
|
@ -173,9 +173,7 @@ func (c *StateReplaceProviderCommand) Run(args []string) int {
|
||||
if isCloudMode(b) {
|
||||
var schemaDiags tfdiags.Diagnostics
|
||||
schemas, schemaDiags = c.MaybeGetSchemas(state, nil)
|
||||
if schemaDiags.HasErrors() {
|
||||
diags = diags.Append(schemaDiags)
|
||||
}
|
||||
diags = diags.Append(schemaDiags)
|
||||
}
|
||||
|
||||
// Write the updated state
|
||||
|
@ -123,9 +123,7 @@ func (c *StateRmCommand) Run(args []string) int {
|
||||
if isCloudMode(b) {
|
||||
var schemaDiags tfdiags.Diagnostics
|
||||
schemas, schemaDiags = c.MaybeGetSchemas(state, nil)
|
||||
if schemaDiags.HasErrors() {
|
||||
diags = diags.Append(schemaDiags)
|
||||
}
|
||||
diags = diags.Append(schemaDiags)
|
||||
}
|
||||
|
||||
if err := stateMgr.WriteState(state); err != nil {
|
||||
|
@ -131,9 +131,7 @@ func (c *TaintCommand) Run(args []string) int {
|
||||
if isCloudMode(b) {
|
||||
var schemaDiags tfdiags.Diagnostics
|
||||
schemas, schemaDiags = c.MaybeGetSchemas(state, nil)
|
||||
if schemaDiags.HasErrors() {
|
||||
diags = diags.Append(schemaDiags)
|
||||
}
|
||||
diags = diags.Append(schemaDiags)
|
||||
}
|
||||
|
||||
ss := state.SyncWrapper()
|
||||
|
@ -170,9 +170,7 @@ func (c *UntaintCommand) Run(args []string) int {
|
||||
if isCloudMode(b) {
|
||||
var schemaDiags tfdiags.Diagnostics
|
||||
schemas, schemaDiags = c.MaybeGetSchemas(state, nil)
|
||||
if schemaDiags.HasErrors() {
|
||||
diags = diags.Append(schemaDiags)
|
||||
}
|
||||
diags = diags.Append(schemaDiags)
|
||||
}
|
||||
|
||||
obj.Status = states.ObjectReady
|
||||
|
Loading…
Reference in New Issue
Block a user