about summary refs log tree commit diff stats
path: root/internal/server
diff options
context:
space:
mode:
authorAlan Pearce2024-06-28 20:43:14 +0200
committerAlan Pearce2024-06-29 16:50:51 +0200
commit6c4a3268bc4c528ecff45f50ed5ca6aa1d48500c (patch)
tree6663946e586d5c0745b984a0a809fc2330ce70d0 /internal/server
parentb4095d108a2646bcf9e7fff64788b10d9bce8da3 (diff)
downloadwebsite-6c4a3268bc4c528ecff45f50ed5ca6aa1d48500c.tar.lz
website-6c4a3268bc4c528ecff45f50ed5ca6aa1d48500c.tar.zst
website-6c4a3268bc4c528ecff45f50ed5ca6aa1d48500c.zip
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)