Skip to content

Commit bc19ade

Browse files
authored
fix: handle .tar.gz extension (#212) (#215)
Signed-off-by: Luca Stocchi <[email protected]>
1 parent 2807fee commit bc19ade

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/oc-install.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,13 @@ export class InstallHandler {
227227

228228
tl.debug(`expanding ${archivePath} into ${downloadDir}`);
229229

230-
const archiveType = path.extname(archive);
230+
let archiveType = path.extname(archive);
231+
const expandDir = archive.replace(archiveType, '');
232+
// handle tar.gz explicitly
233+
if (path.extname(expandDir) === '.tar') {
234+
archiveType = '.tar.gz';
235+
}
236+
231237
await unzipArchive(archiveType, archivePath, downloadDir);
232238

233239
let ocBinary = InstallHandler.ocBinaryByOS(osType);

0 commit comments

Comments
 (0)