Skip to content

Commit

Permalink
fix: tmp path for rootless (#703)
Browse files Browse the repository at this point in the history
  • Loading branch information
mstrangfeld authored Jul 17, 2023
1 parent c48b030 commit 2221b2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"io"
"io/fs"
"os"
"path"
"path/filepath"
"strings"
"time"
Expand Down Expand Up @@ -55,7 +56,7 @@ type sigstoreCustomMetadata struct {
func CreateRepoWithMetadata(ctx context.Context, targets []TargetWithMetadata) (tuf.LocalStore, string, error) {
// TODO: Make this an in-memory fileystem.
tmpDir := os.TempDir()
dir := tmpDir + "tuf"
dir := path.Join(tmpDir, "tuf")
err := os.Mkdir(dir, os.ModePerm)
if err != nil {
return nil, "", fmt.Errorf("failed to create tmp TUF dir: %w", err)
Expand Down

0 comments on commit 2221b2e

Please sign in to comment.