mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 15:22:38 +00:00
process status returns Option now
This commit is contained in:
parent
38955ec60e
commit
5f916b88cc
1 changed files with 7 additions and 4 deletions
5
env/env.rs
vendored
5
env/env.rs
vendored
|
@ -190,10 +190,13 @@ fn main() {
|
||||||
|
|
||||||
match opts.program {
|
match opts.program {
|
||||||
[ref prog, ..args] => {
|
[ref prog, ..args] => {
|
||||||
let exit = std::run::process_status(prog.as_slice(), args.as_slice());
|
match std::run::process_status(prog.as_slice(), args.as_slice()) {
|
||||||
|
Some(exit) =>
|
||||||
match exit {
|
match exit {
|
||||||
std::io::process::ExitStatus(status) => std::os::set_exit_status(status),
|
std::io::process::ExitStatus(status) => std::os::set_exit_status(status),
|
||||||
_ => std::os::set_exit_status(1)
|
_ => std::os::set_exit_status(1)
|
||||||
|
},
|
||||||
|
None => std::os::set_exit_status(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue