boa-cli crashes if history file does not exist #2223
Labels
bug
Something isn't working
cli
Issues and PRs related to the Boa command line interface.
E-Easy
Easy
good first issue
Good for newcomers
Milestone
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 runcargo 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.
boa/boa_cli/src/main.rs
Lines 218 to 221 in 3d6a8d5
The text was updated successfully, but these errors were encountered: