UPB-FILS-SdE2 / questions

0 stars 1 forks source link

[rustybox] invalid command #89

Closed mihaicostin34 closed 8 months ago

mihaicostin34 commented 1 year ago

I keep having this problem. I have tried to return -1 in the main function as an Err(255) and with process::exit(255), yet they don't seem to work. Is there another way to return -1? image

alexandruradovici commented 1 year ago

You have to return -1, not 255. The data type should be i32. Take a look at https://doc.rust-lang.org/std/process/fn.exit.html.