mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
fix/expr: EXIT_CODE=1 for any return output parsable to 0 (or empty)
This commit is contained in:
parent
812d811ff6
commit
8753fb95c3
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ fn process_expr(token_strings: &[&str]) -> Result<String, String> {
|
|||
|
||||
fn print_expr_ok(expr_result: &str) -> UResult<()> {
|
||||
println!("{}", expr_result);
|
||||
if expr_result == "0" || expr_result.is_empty() {
|
||||
if expr_result.parse::<i32>() == Ok(0) || expr_result.is_empty() {
|
||||
Err(1.into())
|
||||
} else {
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue