Skip to content

Commit 5a0cfb0

Browse files
committed
fix: use parseAsync() in CLI to prevent Bun hang
program.parse() doesn't await async action handlers. Node's event loop handles this by accident, but Bun's stricter loop hangs indefinitely. Switching to program.parseAsync() fixes vault-cli integration tests under Bun.
1 parent aa0840e commit 5a0cfb0

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4141
- CLI version string updated from `2.0.0` to `3.0.0`.
4242
- CLI `vault history --max-count` now validates input as a positive integer.
4343
- Stale JSDoc in `GitPersistenceAdapter` corrected (removed mention of retries).
44+
- CLI uses `program.parseAsync()` instead of `program.parse()` to prevent Bun from hanging on async action handlers.
4445

4546
### Changed
4647
- **Vault promoted to domain layer** — all vault logic extracted from facade (`index.js`) into `VaultService` (`src/domain/services/VaultService.js`) with `GitRefPort`/`GitRefAdapter` for ref operations. Facade now delegates to VaultService.

bin/git-cas.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,4 +299,4 @@ vault
299299
}
300300
});
301301

302-
program.parse();
302+
await program.parseAsync();

0 commit comments

Comments
 (0)