mirror of
https://github.com/actions/cache.git
synced 2026-10-02 01:21:43 +00:00
Use path.sep in path replace
This commit is contained in:
1 parent
08438313d5
commit
52046d1409
4 files changed
+17
-21
No files matched your search
+4
-4
@@ -56,10 +56,10 @@ export async function extractTar(archivePath: string): Promise<void> {
|
||||
const args = [
|
||||
"-xz",
|
||||
"-f",
|
||||
archivePath?.replace(/\\/g, "/"),
|
||||
archivePath.replace(new RegExp("\\" + path.sep, "g"), "/"),
|
||||
"-P",
|
||||
"-C",
|
||||
workingDirectory?.replace(/\\/g, "/")
|
||||
workingDirectory.replace(new RegExp("\\" + path.sep, "g"), "/")
|
||||
];
|
||||
await execTar(args);
|
||||
}
|
||||
@@ -79,10 +79,10 @@ export async function createTar(
|
||||
const args = [
|
||||
"-cz",
|
||||
"-f",
|
||||
CacheFilename?.replace(/\\/g, "/"),
|
||||
CacheFilename.replace(new RegExp("\\" + path.sep, "g"), "/"),
|
||||
"-P",
|
||||
"-C",
|
||||
workingDirectory?.replace(/\\/g, "/"),
|
||||
workingDirectory.replace(new RegExp("\\" + path.sep, "g"), "/"),
|
||||
"--files-from",
|
||||
manifestFilename
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user