Skip to content

Commit

Permalink
For good measure, also clone the incoming mCtx when it's the first ct…
Browse files Browse the repository at this point in the history
…x - so it can't be further modified.
  • Loading branch information
scr-oath committed Mar 21, 2024
1 parent 7d35b60 commit de41c1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hooks/hookexecution/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (mc *moduleContexts) put(moduleName string, mCtx hookstage.ModuleContext) {
if existingCtx, ok := mc.ctxs[moduleName]; ok && existingCtx != nil {
maps.Copy(existingCtx, mCtx)
} else {
mc.ctxs[moduleName] = mCtx
mc.ctxs[moduleName] = maps.Clone(mCtx)
}
}

Expand Down

0 comments on commit de41c1f

Please sign in to comment.