about summary refs log tree commit diff stats
path: root/internal/server
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server')
-rw-r--r--internal/server/server.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/server/server.go b/internal/server/server.go
index c7b5659..e83985d 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -109,7 +109,7 @@ func New(runtimeConfig *Config) (*Server, error) {
 		if err != nil {
 			return nil, err
 		}
-		_, err = vcs.CloneOrUpdate(vcsConfig)
+		builderConfig.Repository, err = vcs.CloneOrUpdate(vcsConfig)
 		if err != nil {
 			return nil, err
 		}
@@ -123,6 +123,12 @@ func New(runtimeConfig *Config) (*Server, error) {
 		publicDir := filepath.Join(runtimeConfig.Root, "public")
 		builderConfig.Destination = publicDir
 		runtimeConfig.Root = publicDir
+	} else {
+		var err error
+		builderConfig.Repository, err = vcs.Open(".")
+		if err != nil {
+			return nil, err
+		}
 	}
 
 	config, err := cfg.GetConfig(builderConfig.Source)