nixpulvis / oursh

Your comrade through the perilous world of UNIX.
http://nixpulvis.com/oursh/oursh
MIT License
67 stars 6 forks source link

Don't allow empty programs #21

Closed nixpulvis closed 3 years ago

nixpulvis commented 5 years ago

We currently pass empty text through to the parser causing the error parsing text: message. A simple fix for now would be to just check against the empty string, but longer term we should recover from the parser and decide the correct action.

nixpulvis commented 5 years ago

We were hiding some errors after the big Result refactor landed.

nixpulvis commented 3 years ago

This should be a working solution on master:

https://github.com/nixpulvis/oursh/blob/f760568ba97d1c028962a0e69578a161bd92adf8/src/program/mod.rs#L219-L221