Skip to content

Commit eaf670d

Browse files
authored
fix(logname): return error exit code when there is an error (#9313)
1 parent 8db2277 commit eaf670d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/uu/logname/src/logname.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
2626

2727
if let Some(userlogin) = get_userlogin() {
2828
writeln!(stdout(), "{userlogin}")?;
29+
Ok(())
2930
} else {
3031
show_error!("{}", translate!("logname-error-no-login-name"));
32+
Err(1.into())
3133
}
32-
33-
Ok(())
3434
}
3535

3636
pub fn uu_app() -> Command {

0 commit comments

Comments
 (0)