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:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user