mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 02:04:32 +00:00
Fix pi-agent CLI execution issue when installed globally
- Remove isMainModule check that was preventing execution via npm symlink - CLI now runs main function directly when executed - Bump version to 0.5.1
This commit is contained in:
parent
c615f3f011
commit
d304f377d7
10 changed files with 19 additions and 110 deletions
|
|
@ -286,9 +286,8 @@ export async function main(args: string[]): Promise<void> {
|
|||
}
|
||||
|
||||
// Run as CLI if invoked directly
|
||||
if (import.meta.url === `file://${process.argv[1]}`) {
|
||||
main(process.argv.slice(2)).catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
// Run main function when executed directly
|
||||
main(process.argv.slice(2)).catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue