about summary refs log tree commit diff
path: root/tools/nixery/server/storage/filesystem.go
diff options
context:
space:
mode:
Diffstat (limited to 'tools/nixery/server/storage/filesystem.go')
-rw-r--r--tools/nixery/server/storage/filesystem.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/nixery/server/storage/filesystem.go b/tools/nixery/server/storage/filesystem.go
index ef763da67f..f343d67b65 100644
--- a/tools/nixery/server/storage/filesystem.go
+++ b/tools/nixery/server/storage/filesystem.go
@@ -15,7 +15,12 @@ type FSBackend struct {
 	path string
 }
 
-func NewFSBackend(p string) (*FSBackend, error) {
+func NewFSBackend() (*FSBackend, error) {
+	p := os.Getenv("STORAGE_PATH")
+	if p == "" {
+		return nil, fmt.Errorf("STORAGE_PATH must be set for filesystem storage")
+	}
+
 	p = path.Clean(p)
 	err := os.MkdirAll(p, 0755)
 	if err != nil {