Skip to content

Commit

Permalink
Add dependencies option to std.process
Browse files Browse the repository at this point in the history
  • Loading branch information
kylewlacy committed May 26, 2024
1 parent 1cd1359 commit 0551705
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions projects/std/core/recipes/process.bri
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export type ProcessOptions = {
command: ProcessTemplateLike;
args?: ProcessTemplateLike[];
env?: Record<string, ProcessTemplateLike>;
dependencies?: AsyncRecipe<Directory>[];
workDir?: AsyncRecipe<Directory>;
outputScaffold?: AsyncRecipe | null;
} & ({ unsafe?: false } | { unsafe: true; networking?: boolean });
Expand Down Expand Up @@ -50,6 +51,11 @@ export function process(options: ProcessOptions): Process {
]),
),
),
dependencies: await Promise.all(
(options.dependencies ?? []).map(
async (dep) => await (await dep).briocheSerialize(),
),
),
platform: "x86_64-linux",
workDir: await (
await (options.workDir ?? directory())
Expand Down

0 comments on commit 0551705

Please sign in to comment.