Skip to content

Commit

Permalink
add option to add arbitrary flags
Browse files Browse the repository at this point in the history
  • Loading branch information
hazelnutcloud committed Jan 20, 2023
1 parent 30f0f12 commit 354b57a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compress.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { exists, join } from "./deps.ts";
interface CompressOptions {
overwrite?: boolean;
flags: string[];
}
const compressProcess = async (
files: string | string[],
Expand All @@ -26,7 +27,7 @@ const compressProcess = async (
archiveName,
options?.overwrite ? "-Force" : "",
]
: ["zip", "-r", archiveName, ...filesList.split(" ")],
: ["zip", "-r", ...options?.flags ?? [], archiveName, ...filesList.split(" ")],
});
const processStatus = (await compressCommandProcess.status()).success;
Deno.close(compressCommandProcess.rid);
Expand Down

0 comments on commit 354b57a

Please sign in to comment.