fix: Address code review comment on spawn-agent.ts
Co-authored-by: blackboxprogramming <118287761+blackboxprogramming@users.noreply.github.com>
This commit is contained in:
@@ -318,6 +318,8 @@ export function main(): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Run CLI if executed directly
|
// Run CLI if executed directly
|
||||||
if (require.main === module) {
|
// Using dynamic check that works with both CommonJS and tsx/ts-node
|
||||||
|
const isMain = typeof require !== "undefined" && require.main === module;
|
||||||
|
if (isMain) {
|
||||||
main();
|
main();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user