Skip to content

Commit 5221c34

Browse files
committed
fix: create sbom scanner without tmpfs in windows
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
1 parent 16e8c26 commit 5221c34

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

frontend/attestations/sbom/sbom.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"encoding/json"
66
"fmt"
77
"path"
8+
"runtime"
89
"strings"
910

1011
intoto "github.com/in-toto/in-toto-golang/in_toto"
@@ -84,7 +85,9 @@ func CreateSBOMScanner(ctx context.Context, resolver sourceresolver.MetaResolver
8485
}
8586

8687
runscan := llb.Image(scanner).Run(runOpts...)
87-
runscan.AddMount("/tmp", llb.Scratch(), llb.Tmpfs())
88+
if runtime.GOOS != "windows" {
89+
runscan.AddMount("/tmp", llb.Scratch(), llb.Tmpfs())
90+
}
8891

8992
runscan.AddMount(path.Join(srcDir, "core", CoreSBOMName), ref, llb.Readonly)
9093
for k, extra := range extras {

0 commit comments

Comments
 (0)