HarperFast / HarperFast/harper
CLI install: tilde (~) path not expanded correctly for HarperDB destination
- Dominant language
- JavaScript
- Stars
- 89
- Forks
- 10
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 200
Description
When the CLI install prompt asks "Please enter a destination for HarperDB:", entering a `~/...` path is handled inconsistently:
- Sometimes creates a literal `~` directory relative to cwd.
- Sometimes tries to resolve it as an absolute home path but fails.
- Only a leading `/` path reliably works.
## Reproduction
```
Please enter a destination for HarperDB: ~/dev/hdb
# → installs successfully but then:
Error: ENOENT: no such file or directory, open '/Users/ethan/dev/hdb/harperdb-config.yaml'
```
The directory was installed to the correct location but `~/dev/hdb` was not expanded consistently everywhere it was used — some code paths got the unexpanded string.
## Fix
Resolve all user-supplied paths through `path.resolve()` / `os.homedir()` expansion immediately after input, before storing or using them anywhere.
---
🤖 Filed by Claude on behalf of Kris.
Contributor guide
Assessment
This issue has not been assessed yet.