Skip to content

Commit aeb2d4f

Browse files
committed
Resolve comments
1 parent e54524b commit aeb2d4f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tool.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ export async function extract7z(file: string, dest?: string, _7zPath?: string, o
403403

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

0 commit comments

Comments
 (0)