Skip to content

Commit

Permalink
Enabled force updating a source even when the value hasn't changed (w…
Browse files Browse the repository at this point in the history
…rite command).
  • Loading branch information
kristofferahl committed Jan 15, 2024
1 parent 172fd2d commit ad00662
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/command/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@ func Write(metadata config.AppMetadata) *cli.Command {
}

if strVal == v.Raw() {
break
if ok := promptYesNo("the value is unchanged, force update"); !ok {
ctx.Log.Debugf("skipping update of %s in %s, value unchanged", i.sourceKey, v.Source().Type())
break
} else {
ctx.Log.Debugf("force updating %s in %s, value unchanged", i.sourceKey, v.Source().Type())
}
}

ctx.Log.Debugf("setting %s in %s, new value: %s", i.sourceKey, v.Source().Type(), newVal.String())
Expand Down

0 comments on commit ad00662

Please sign in to comment.