Skip to content

Commit

Permalink
fixup! add IMAGE_BUILDER_DATA_DIR env (mostly for the demo)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvo5 committed Nov 27, 2024
1 parent 442da7b commit 8051006
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/image-builder/repos.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package main

import (
"import os"

Check failure on line 4 in cmd/image-builder/repos.go

View workflow job for this annotation

GitHub Actions / build

malformed import path "import os": invalid char ' '

"github.com/osbuild/images/pkg/reporegistry"
)

Expand All @@ -21,8 +23,11 @@ var defaultDataDirs = []string{

var newRepoRegistry = func(dataDir string) (*reporegistry.RepoRegistry, error) {
var dataDirs []string

if dataDir != "" {
dataDirs = []string{dataDir}
} else if envDataDir := os.Getenv("IMAGE_BUILDER_DATA_DIR"); envDataDir != "" {
dataDirs = []string{dataDir}
} else {
dataDirs = defaultDataDirs
}
Expand Down

0 comments on commit 8051006

Please sign in to comment.