build outside of working directory
1 file changed, 3 insertions(+), 4 deletions(-)
changed files
M internal/server/server.go → internal/server/server.go
@@ -99,7 +99,6 @@ } func New(runtimeConfig *Config) (*Server, error) { builderConfig := &builder.IOConfig{ - Source: "content", Destination: runtimeConfig.Root, Development: runtimeConfig.Development, }@@ -114,19 +113,19 @@ _, err = vcs.CloneOrUpdate(vcsConfig) if err != nil { return nil, err } - err = os.Chdir(vcsConfig.LocalPath) + err = os.Chdir(runtimeConfig.Root) if err != nil { return nil, err } - builderConfig.Source = filepath.Join(vcsConfig.LocalPath, "content") + builderConfig.Source = vcsConfig.LocalPath publicDir := filepath.Join(runtimeConfig.Root, "public") builderConfig.Destination = publicDir runtimeConfig.Root = publicDir } - config, err := cfg.GetConfig() + config, err := cfg.GetConfig(builderConfig.Source) if err != nil { return nil, errors.WithMessage(err, "error parsing configuration file") }