From 8cde425b600a803cf54b356af6f3f6a2a9bae53f Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 17 Dec 2019 13:11:21 -0800 Subject: [PATCH] Add Context.SetFs Allow the primary builder to set the filesystem directly. Bug: 146437378 Test: m checkbuild Change-Id: Ic8cc3e6a03943d5f47b041a66df6a11f4336c97b --- context.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/context.go b/context.go index 6a53776..0619953 100644 --- a/context.go +++ b/context.go @@ -889,6 +889,10 @@ func (c *Context) MockFileSystem(files map[string][]byte) { c.fs = pathtools.MockFs(files) } +func (c *Context) SetFs(fs pathtools.FileSystem) { + c.fs = fs +} + // openAndParse opens and parses a single Blueprints file, and returns the results func (c *Context) openAndParse(filename string, scope *parser.Scope, rootDir string, parent *fileParseContext) (file *parser.File,