diff --git a/live_tracker.go b/live_tracker.go index e2c4057..e62dc59 100644 --- a/live_tracker.go +++ b/live_tracker.go @@ -229,6 +229,12 @@ func (l *liveTracker) innerAddNinjaStringDeps(str *ninjaString) error { return nil } +func (l *liveTracker) Eval(n *ninjaString) (string, error) { + l.Lock() + defer l.Unlock() + return n.Eval(l.variables) +} + func (l *liveTracker) RemoveVariableIfLive(v Variable) bool { l.Lock() defer l.Unlock() diff --git a/singleton_ctx.go b/singleton_ctx.go index 95c29c4..176aa25 100644 --- a/singleton_ctx.go +++ b/singleton_ctx.go @@ -289,7 +289,7 @@ func (s *singletonContext) Eval(pctx PackageContext, str string) (string, error) return "", err } - return ninjaStr.Eval(s.globals.variables) + return s.globals.Eval(ninjaStr) } func (s *singletonContext) RequireNinjaVersion(major, minor, micro int) {