From e649704233e78c255de5fef5223a9130df98cd0e Mon Sep 17 00:00:00 2001 From: Yohe-Am <56622350+Yohe-Am@users.noreply.github.com> Date: Tue, 12 Dec 2023 00:34:32 +0000 Subject: [PATCH] fix: whiz mac tar issues --- ghjk.ts | 4 ++-- ports/whiz.ts | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ghjk.ts b/ghjk.ts index 77657aea..f5224d0e 100644 --- a/ghjk.ts +++ b/ghjk.ts @@ -31,5 +31,5 @@ import whiz from "./ports/whiz.ts"; // }); // protoc({}); // earthly({}); -ruff({}); -// whiz({}); +// ruff({}); +whiz({}); diff --git a/ports/whiz.ts b/ports/whiz.ts index d4f2bcfb..e9fdde8d 100644 --- a/ports/whiz.ts +++ b/ports/whiz.ts @@ -1,6 +1,7 @@ import { $, addInstallGlobal, + depBinShimPath, DownloadArgs, downloadFile, GithubReleasePort, @@ -11,14 +12,18 @@ import { std_fs, std_path, std_url, - unarchive, } from "../port.ts"; +import * as std_ports from "../modules/ports/std.ts"; const manifest = { ty: "denoWorker" as const, name: "whiz@ghrel", version: "0.1.0", moduleSpecifier: import.meta.url, + deps: [ + // we have to use tar because their tarballs for darwin use gnu sparse + std_ports.tar_aa, + ], }; registerDenoPortGlobal(manifest, () => new Port()); @@ -48,8 +53,9 @@ export class Port extends GithubReleasePort { downloadUrl(args.installVersion, args.platform), ); const fileDwnPath = std_path.resolve(args.downloadPath, fileName); - - await unarchive(fileDwnPath, args.tmpDirPath); + await $`${ + depBinShimPath(std_ports.tar_aa, "tar", args.depShims) + } xf ${fileDwnPath} --directory=${args.tmpDirPath}`; const installPath = $.path(args.installPath); if (await installPath.exists()) {