10000 feat: Add ability to pass optional cli Args to FuseProcess · fuse-box/fuse-box@552df36 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit 552df36

Browse files
asdftdnchanged
authored andcommitted
feat: Add ability to pass optional cli Args to FuseProcess
1 parent 7c9b7bd commit 552df36

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/FuseProcess.ts

Lines changed: 4 additions & 4 deletion 8000 s
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ export class FuseProcess {
1717
}
1818
}
1919
/** Starts a process (for example express server) */
20-
public start(): FuseProcess {
20+
public start(cliArgs?: string[]): FuseProcess {
2121
this.kill();
22-
this.exec();
22+
this.exec(cliArgs || []);
2323
return this;
2424
}
2525

@@ -70,8 +70,8 @@ export class FuseProcess {
7070
});
7171
}
7272
/** Spawns another proces */
73-
public exec(): FuseProcess {
74-
const node = spawn("node", [this.filePath], {
73+
public exec(cliArgs?: string[]): FuseProcess {
74+
const node = spawn("node", [this.filePath, ...cliArgs], {
7575
stdio: "inherit",
7676
});
7777
node.on("close", code => {

0 commit comments

Comments
 (0)
0