Open mosabua opened 7 years ago
I found that my history file contained this:
help
hostname
cd /opt/dev/
ls
cd github/takari/maven-wrapper/
mvn
mvn clean
mvn -v
edxit
exit
1493134191836:exit
1493134231528:test
1493134236167:mvn version
1493134249674:exit
1493134260140:exit
1493134453260:vim /home/manfred/.m2/mvnsh.history
1493134457827:vi /home/manfred/.m2/mvnsh.history
1493134460916:exit
Once I emptied it .. the stacktrace goes away. So maybe the issue only affects beta testers so to speak ;-)
yup, its something I need to add to some release notes. jline3 history persistence is not compatible with previous version; removing the file should fix; but perhaps I can do something smarter.
If you have control over reading the file in, you could just purge everything that does not start with a bunch of numbers.. or something like that. Probably fine to just lose that history.
DefaultHistory impl is not terribly useful for doing stuff like that, so I may need to work with @gnodet to improve it a bit. Its also logging that as INFO which is also not ideal. But for now you can either rm the history file; ignore the error and I think next history --save
may fix it; but I've not verified that yet.
UPDATE history --purge
is what fixes this, history --save
only flushes any pending lines to the end of the file.
I just rm'ed the file. Feel free to close the issue or leave it open as a reminder.
Using mvnsh-assembly-1.2.0-20170425.065527-18-bin.zip I get this at startup: