We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95666bd commit 0abd3fcCopy full SHA for 0abd3fc
cmd/firmware-action/recipes/detect_changes.go
@@ -79,6 +79,15 @@ func (c *ChangeConfig) DetectChanges(target string) bool {
79
// proving to be far too much work. Instead we save the whole configuration file (for each module
80
// separately) and only compare the relevant modules between these two configurations
81
82
+ // Check if current config is nil
83
+ if c.Config == nil {
84
+ slog.Warn("Current configuration is nil, assuming no changes are needed",
85
+ slog.String("suggestion", logging.ThisShouldNotHappenMessage),
86
+ )
87
+ c.ChangesDetected = false
88
+ return false
89
+ }
90
+
91
err := filesystem.CheckFileExists(c.ResultFile)
92
if errors.Is(err, os.ErrExist) {
93
oldConfig, err := ReadConfig(c.ResultFile)
0 commit comments