Skip to content

Commit

Permalink
fix: whiz mac tar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohe-Am committed Dec 12, 2023
1 parent fc9473c commit e649704
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ghjk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ import whiz from "./ports/whiz.ts";
// });
// protoc({});
// earthly({});
ruff({});
// whiz({});
// ruff({});
whiz({});
12 changes: 9 additions & 3 deletions ports/whiz.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
$,
addInstallGlobal,
depBinShimPath,
DownloadArgs,
downloadFile,
GithubReleasePort,
Expand All @@ -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());
Expand Down Expand Up @@ -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()) {
Expand Down

0 comments on commit e649704

Please sign in to comment.