mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-04-21 08:13:56 +08:00
Use path.sep in path replace
This commit is contained in:
parent
08438313d5
commit
52046d1409
4 changed files with 17 additions and 21 deletions
|
@ -51,10 +51,10 @@ test("extract BSD tar", async () => {
|
|||
[
|
||||
"-xz",
|
||||
"-f",
|
||||
archivePath?.replace(/\\/g, "/"),
|
||||
IS_WINDOWS ? archivePath.replace(/\\/g, "/") : archivePath,
|
||||
"-P",
|
||||
"-C",
|
||||
workspace?.replace(/\\/g, "/")
|
||||
IS_WINDOWS ? workspace?.replace(/\\/g, "/") : workspace
|
||||
],
|
||||
{ cwd: undefined }
|
||||
);
|
||||
|
@ -78,7 +78,7 @@ test("extract GNU tar", async () => {
|
|||
[
|
||||
"-xz",
|
||||
"-f",
|
||||
archivePath?.replace(/\\/g, "/"),
|
||||
archivePath.replace(/\\/g, "/"),
|
||||
"-P",
|
||||
"-C",
|
||||
workspace?.replace(/\\/g, "/"),
|
||||
|
@ -111,10 +111,10 @@ test("create BSD tar", async () => {
|
|||
[
|
||||
"-cz",
|
||||
"-f",
|
||||
CacheFilename?.replace(/\\/g, "/"),
|
||||
IS_WINDOWS ? CacheFilename.replace(/\\/g, "/") : CacheFilename,
|
||||
"-P",
|
||||
"-C",
|
||||
workspace?.replace(/\\/g, "/"),
|
||||
IS_WINDOWS ? workspace?.replace(/\\/g, "/") : workspace,
|
||||
"--files-from",
|
||||
"manifest.txt"
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue