From 73e91eab5ba0aa659f568df1f63ab3c6ebb15c56 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Tue, 27 Dec 2022 14:31:11 +0100 Subject: [PATCH] fix(shell): lock template cache creation --- src/platform/shell.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platform/shell.go b/src/platform/shell.go index 3732d667..540bacb3 100644 --- a/src/platform/shell.go +++ b/src/platform/shell.go @@ -708,6 +708,8 @@ func (env *Shell) Logs() string { } func (env *Shell) TemplateCache() *TemplateCache { + lock.Lock() + defer lock.Unlock() defer env.Trace(time.Now(), "TemplateCache") if env.tmplCache != nil { return env.tmplCache