Skip to content

Commit

Permalink
Wrapping Deno.build.os
Browse files Browse the repository at this point in the history
  • Loading branch information
ta-Hirose committed Sep 28, 2022
1 parent efea3cd commit e2b96b9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libs/postprocess/unzipper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export class Unzipper extends BasePostprocess {
async execute(_: string[], targetPath: string): Promise<string> {
const splitedPath = targetPath.split("/");
const targetDir = splitedPath.slice(0, splitedPath.length - 1).join("/");
if (Deno.build.os === "darwin") {
if (getBuild.getOs() === "darwin") {
const process = Deno.run({
cmd: ["ditto", "-xk", "--sequesterRsrc", targetPath, targetDir],
stdout: "piped",
Expand All @@ -30,3 +30,9 @@ export class Unzipper extends BasePostprocess {
return true;
}
}

function getOs(): string {
return Deno.build.os;
}

export const getBuild = { getOs };

0 comments on commit e2b96b9

Please sign in to comment.