Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --overwrite flag to tar extraction #156

Merged
merged 5 commits into from Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion dist/post_run/index.js
Expand Up @@ -49250,7 +49250,12 @@ function installLint(versionConfig) {
repl = /\.zip$/;
}
else {
extractedDir = yield tc.extractTar(archivePath, process.env.HOME);
// We want to always overwrite files if the local cache already has them
const args = ["xz"];
if (process.platform.toString() != "darwin") {
args.push("--overwrite");
}
extractedDir = yield tc.extractTar(archivePath, process.env.HOME, args);
}
const urlParts = assetURL.split(`/`);
const dirName = urlParts[urlParts.length - 1].replace(repl, ``);
Expand Down
7 changes: 6 additions & 1 deletion dist/run/index.js
Expand Up @@ -49260,7 +49260,12 @@ function installLint(versionConfig) {
repl = /\.zip$/;
}
else {
extractedDir = yield tc.extractTar(archivePath, process.env.HOME);
// We want to always overwrite files if the local cache already has them
const args = ["xz"];
if (process.platform.toString() != "darwin") {
args.push("--overwrite");
}
extractedDir = yield tc.extractTar(archivePath, process.env.HOME, args);
}
const urlParts = assetURL.split(`/`);
const dirName = urlParts[urlParts.length - 1].replace(repl, ``);
Expand Down
7 changes: 6 additions & 1 deletion src/install.ts
Expand Up @@ -45,7 +45,12 @@ export async function installLint(versionConfig: VersionConfig): Promise<string>
extractedDir = await tc.extractZip(archivePath, process.env.HOME)
repl = /\.zip$/
} else {
extractedDir = await tc.extractTar(archivePath, process.env.HOME)
// We want to always overwrite files if the local cache already has them
const args = ["xz"]
if (process.platform.toString() != "darwin") {
args.push("--overwrite")
}
extractedDir = await tc.extractTar(archivePath, process.env.HOME, args)
}

const urlParts = assetURL.split(`/`)
Expand Down