Skip to content

Commit 2221b2e

Browse files
authored
fix: tmp path for rootless (#703)
1 parent c48b030 commit 2221b2e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/repo/repo.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"io"
2525
"io/fs"
2626
"os"
27+
"path"
2728
"path/filepath"
2829
"strings"
2930
"time"
@@ -55,7 +56,7 @@ type sigstoreCustomMetadata struct {
5556
func CreateRepoWithMetadata(ctx context.Context, targets []TargetWithMetadata) (tuf.LocalStore, string, error) {
5657
// TODO: Make this an in-memory fileystem.
5758
tmpDir := os.TempDir()
58-
dir := tmpDir + "tuf"
59+
dir := path.Join(tmpDir, "tuf")
5960
err := os.Mkdir(dir, os.ModePerm)
6061
if err != nil {
6162
return nil, "", fmt.Errorf("failed to create tmp TUF dir: %w", err)

0 commit comments

Comments
 (0)