boa icon indicating copy to clipboard operation
boa copied to clipboard

boa-cli crashes if history file does not exist

Open RageKnify opened this issue 2 years ago • 0 comments

Describe the bug boa_cli crashes when the .boa_history does not exist. I think this was introduced in #1809 with the rustyline update.

To Reproduce In the project directory you can change .boa_history's name to .boa_history.bak and try to run cargo run, it will exit with "No such file or directory".

Expected behavior The code below should be modified to create the history file if it doesn't exist yet. Not sure what is the best way to go about this but I expect rustyline to include this in its API. https://github.com/boa-dev/boa/blob/3d6a8d5232edfb75382de5ef4be4bd895f5bee17/boa_cli/src/main.rs#L218-L221

RageKnify avatar Aug 06 '22 11:08 RageKnify