Use path.sep in path replace

This commit is contained in:
Aiqiao Yan 2020-04-13 12:20:27 -04:00
parent 08438313d5
commit 52046d1409
4 changed files with 17 additions and 21 deletions

View file

@ -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"
],