function unzipVSCode(vscodeArchivePath) {
    // The 'vscode-1.32' out of '.../vscode-1.32.zip'
    var dirName = path.parse(vscodeArchivePath).name;
    var extractDir = path.resolve(vscodeTestDir, dirName);
    if (vscodeArchivePath.endsWith('.zip')) {
        if (process.platform === 'win32') {
            cp.spawnSync('powershell.exe', [
                '-NoProfile',
                '-ExecutionPolicy', 'Bypass',
                '-NonInteractive',
                '-NoLogo',
                '-Command',
                "Microsoft.PowerShell.Archive\\Expand-Archive -Path \"" + vscodeArchivePath + "\" -DestinationPath \"" + extractDir + "\""
            ]);
        }
        else {
            cp.spawnSync('unzip', [vscodeArchivePath, '-d', "" + extractDir]);
        }
    }
    else {
        // tar does not create extractDir by default
        if (!fs.existsSync(extractDir)) {
            fs.mkdirSync(extractDir);
        }
        cp.spawnSync('tar', ['-xzf', vscodeArchivePath, '-C', extractDir]);
    }
}
/**
 * Unzip a .zip or .tar.gz VS Code archive
 */
Unzip a .zip or .tar.gz VS Code archive
Unzip a . zip or . tar . gz VS Code archive
function unzipVSCode(vscodeArchivePath) {
    var dirName = path.parse(vscodeArchivePath).name;
    var extractDir = path.resolve(vscodeTestDir, dirName);
    if (vscodeArchivePath.endsWith('.zip')) {
        if (process.platform === 'win32') {
            cp.spawnSync('powershell.exe', [
                '-NoProfile',
                '-ExecutionPolicy', 'Bypass',
                '-NonInteractive',
                '-NoLogo',
                '-Command',
                "Microsoft.PowerShell.Archive\\Expand-Archive -Path \"" + vscodeArchivePath + "\" -DestinationPath \"" + extractDir + "\""
            ]);
        }
        else {
            cp.spawnSync('unzip', [vscodeArchivePath, '-d', "" + extractDir]);
        }
    }
    else {
        if (!fs.existsSync(extractDir)) {
            fs.mkdirSync(extractDir);
        }
        cp.spawnSync('tar', ['-xzf', vscodeArchivePath, '-C', extractDir]);
    }
}
function unzipVSCode ( vscodeArchivePath ) { var dirName = path . parse ( vscodeArchivePath ) . name ; var extractDir = path . resolve ( vscodeTestDir , dirName ) ; if ( vscodeArchivePath . endsWith ( '.zip' ) ) { if ( process . platform === 'win32' ) { cp . spawnSync ( 'powershell.exe' , [ '-NoProfile' , '-ExecutionPolicy' , 'Bypass' , '-NonInteractive' , '-NoLogo' , '-Command' , "Microsoft.PowerShell.Archive\\Expand-Archive -Path \"" + vscodeArchivePath + "\" -DestinationPath \"" + extractDir + "\"" ] ) ; } else { cp . spawnSync ( 'unzip' , [ vscodeArchivePath , '-d' , "" + extractDir ] ) ; } } else { if ( ! fs . existsSync ( extractDir ) ) { fs . mkdirSync ( extractDir ) ; } cp . spawnSync ( 'tar' , [ '-xzf' , vscodeArchivePath , '-C' , extractDir ] ) ; } }
Unzip a .zip or .tar.gz VS Code archive
Unzip a . zip or . tar . gz VS Code archive
// The 'vscode-1.32' out of '.../vscode-1.32.zip' // tar does not create extractDir by default