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.
When the CLI install prompt asks "Please enter a destination for HarperDB:", entering a
~/...path is handled inconsistently:~directory relative to cwd./path reliably works.Reproduction
The directory was installed to the correct location but
~/dev/hdbwas 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.