Test sudo tar

This commit is contained in:
Josh Gross committed 2019-12-27 11:48:00 -05:00
1 parent a631fadf14
commit 7527073910
3 files changed
+10509 -1

No files matched your search

+5266
View File
File diff suppressed because it is too large. Load diff
+5240
View File
File diff suppressed because it is too large. Load diff
+3 -1
View File
@@ -16,7 +16,9 @@ async function getTarPath(): Promise<string> {
async function execTar(args: string[]): Promise<void> { async function execTar(args: string[]): Promise<void> {
try { try {
await exec(`"${await getTarPath()}"`, args); const tarPath = await getTarPath();
const tarExec = process.platform !== "win32" ? `sudo ${tarPath}` : tarPath;
await exec(`"${tarExec}"`, args);
} catch (error) { } catch (error) {
const IS_WINDOWS = process.platform === "win32"; const IS_WINDOWS = process.platform === "win32";
if (IS_WINDOWS) { if (IS_WINDOWS) {