Skip to content

Commit fcb9d66

Browse files
committed
tar: use absolute path as srcPath when generating the tar stream
1 parent a2e072c commit fcb9d66

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tar.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ import (
1818
)
1919

2020
func createTarStream(srcPath, dockerfilePath string) (io.ReadCloser, error) {
21+
srcPath, err := filepath.Abs(srcPath)
22+
if err != nil {
23+
return nil, err
24+
}
25+
2126
excludes, err := parseDockerignore(srcPath)
2227
if err != nil {
2328
return nil, err

0 commit comments

Comments
 (0)