mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 16:31:10 -06:00
don't check diags for errors
This commit is contained in:
parent
4d749e2813
commit
37b7e6ebce
@ -253,10 +253,8 @@ 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)
|
||||
}
|
||||
}
|
||||
|
||||
// Persist the final state
|
||||
log.Printf("[INFO] Writing state output to: %s", c.Meta.StateOutPath())
|
||||
|
@ -398,10 +398,8 @@ 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)
|
||||
}
|
||||
}
|
||||
|
||||
// Write the new state
|
||||
if err := stateToMgr.WriteState(stateTo); err != nil {
|
||||
|
@ -173,10 +173,8 @@ 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)
|
||||
}
|
||||
}
|
||||
|
||||
// Write the updated state
|
||||
if err := stateMgr.WriteState(state); err != nil {
|
||||
|
@ -123,10 +123,8 @@ 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)
|
||||
}
|
||||
}
|
||||
|
||||
if err := stateMgr.WriteState(state); err != nil {
|
||||
c.Ui.Error(fmt.Sprintf(errStateRmPersist, err))
|
||||
|
@ -131,10 +131,8 @@ 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)
|
||||
}
|
||||
}
|
||||
|
||||
ss := state.SyncWrapper()
|
||||
|
||||
|
@ -170,10 +170,8 @@ 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)
|
||||
}
|
||||
}
|
||||
|
||||
obj.Status = states.ObjectReady
|
||||
ss.SetResourceInstanceCurrent(addr, obj, rs.ProviderConfig)
|
||||
|
Loading…
Reference in New Issue
Block a user