Skip to content

Commit 0486d3d

Browse files
Apply suggested fix to internal/templates/apply.go from Copilot Autofix
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Manuel Alejandro de Brito Fontes <aledbf@gmail.com>
1 parent 883d827 commit 0486d3d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎internal/templates/apply.go‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ func mergeFeatures(fsys pfs.FS, workspaceFolder string, featureOpts []TemplateFe
191191
return fmt.Errorf("parse %s: %w", configPath, stdErr)
192192
}
193193
var config map[string]json.RawMessage
194-
json.Unmarshal(stdData, &config)
194+
if err := json.Unmarshal(stdData, &config); err != nil {
195+
return fmt.Errorf("unmarshal %s: %w", configPath, err)
196+
}
195197
existing := map[string]bool{}
196198
_, hasFeatures := config["features"]
197199
if hasFeatures {

0 commit comments

Comments
 (0)