Add a getter for ModuleListFile to SingletonContext

This commit is contained in:
Chris Parsons 2020-05-20 13:50:58 -04:00
parent 2bcc43c60f
commit 56a06b3c06

View file

@ -147,6 +147,10 @@ type SingletonContext interface {
// Fs returns a pathtools.Filesystem that can be used to interact with files. Using the Filesystem interface allows
// the singleton to be used in build system tests that run against a mock filesystem.
Fs() pathtools.FileSystem
// ModuleListFile returns a string representation of the path to the file
// which lists blueprint files to parse.
ModuleListFile() string
}
var _ SingletonContext = (*singletonContext)(nil)
@ -350,3 +354,7 @@ func (s *singletonContext) GlobWithDeps(pattern string,
func (s *singletonContext) Fs() pathtools.FileSystem {
return s.context.fs
}
func (s *singletonContext) ModuleListFile() string {
return s.context.moduleListFile
}