Skip to content

Commit

Permalink
Resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
EzzhevNikita committed Mar 25, 2022
1 parent e54524b commit aeb2d4f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ export async function extract7z(file: string, dest?: string, _7zPath?: string, o

if (_7zPath) {
// extract
let _7z: trm.ToolRunner = tl.tool(_7zPath);
const _7z: trm.ToolRunner = tl.tool(_7zPath);
if (overwriteDest) {
_7z.arg('-aoa');
}
Expand All @@ -420,7 +420,8 @@ export async function extract7z(file: string, dest?: string, _7zPath?: string, o
let escapedScript = path.join(__dirname, 'Invoke-7zdec.ps1').replace(/'/g, "''").replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines
let escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, '');
let escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, '');
let command: string = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}' -OverrideDestDirectory ${overwriteDest ? 1 : 0}`;
const overrideDestDirectory: number = overwriteDest ? 1 : 0;
const command: string = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}' -OverrideDestDirectory ${overrideDestDirectory}`;
let powershellPath = tl.which('powershell', true);
let powershell: trm.ToolRunner = tl.tool(powershellPath)
.line('-NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command')
Expand Down

0 comments on commit aeb2d4f

Please sign in to comment.