Skip to content

Commit 2e867fc

Browse files
committed
[#250] Make -cache work with relative path.
1 parent 187fb53 commit 2e867fc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/volume/volume.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ func Mount(workDirHost string, cacheDirHost string) (Volume, error) {
7272
if err != nil {
7373
return Volume{}, err
7474
}
75+
} else {
76+
cacheDirHost, err = filepath.Abs(cacheDirHost)
77+
if err != nil {
78+
return Volume{}, fmt.Errorf("could not make the cache directory an absolute path: %w", err)
79+
}
7580
}
7681

7782
l := Volume{

0 commit comments

Comments
 (0)