Skip to content

Commit

Permalink
fix: "host" builder tar paths
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Vasek <[email protected]>
  • Loading branch information
matejvasek committed Jul 13, 2023
1 parent 8f0b7c2 commit be42b7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/oci/containerize.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"io"
"os"
slashpath "path"
"path/filepath"
"strings"

Expand Down Expand Up @@ -159,7 +160,7 @@ func newDataTarball(source, target string, ignored []string, verbose bool) error
return err
}

header.Name = filepath.Join("/func", relPath)
header.Name = slashpath.Join("/func", filepath.ToSlash(relPath))
// TODO: should we set file timestamps to the build start time of cfg.t?
// header.ModTime = timestampArgument

Expand Down
3 changes: 2 additions & 1 deletion pkg/oci/containerize_go.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"io"
"os"
"os/exec"
slashpath "path"
"path/filepath"
"strings"

Expand Down Expand Up @@ -170,7 +171,7 @@ func newExecTarball(source, target string, verbose bool) error {
return err
}

header.Name = path("/func", "f")
header.Name = slashpath.Join("/func", "f")
// TODO: should we set file timestamps to the build start time of cfg.t?
// header.ModTime = timestampArgument

Expand Down

0 comments on commit be42b7a

Please sign in to comment.