forked from bonsai/harakit
fop(1): fixes unhandled i/o error
This commit is contained in:
parent
d5d13b84a7
commit
09193a14d5
@ -70,7 +70,10 @@ fn main() {
|
||||
});
|
||||
|
||||
let mut buf = String::new();
|
||||
let _ = stdin().read_to_string(&mut buf);
|
||||
if let Err(e) = stdin().read_to_string(&mut buf) {
|
||||
eprintln!("{}: {}", argv[0], e.strerror);
|
||||
exit(EX_IOERR);
|
||||
};
|
||||
|
||||
/* split the buffer by the delimiter (by default, '\u{1E}') */
|
||||
let mut fields = buf.split(&d).collect::<Vec<&str>>();
|
||||
|
Loading…
Reference in New Issue
Block a user