Skip to content

Commit 962ecf2

Browse files
committed
common: fix zygote opts
1 parent 4c3f1c4 commit 962ecf2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

common/src/zygote.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ import os from 'os';
55

66
export type Zygote<T> = () => PluginFork<T>;
77

8-
export function createZygote<T>(name: string): Zygote<T> {
9-
let zygote = sdk.fork<T>();
8+
export function createZygote<T>(name?: string, filename?: string): Zygote<T> {
9+
const opts = {
10+
name,
11+
filename,
12+
};
13+
let zygote = sdk.fork<T>(opts);
1014
function* next() {
1115
while (true) {
1216
const cur = zygote;
13-
zygote = sdk.fork<T>({
14-
name,
15-
});
17+
zygote = sdk.fork<T>(opts);
1618
yield cur;
1719
}
1820
}

0 commit comments

Comments
 (0)