Skip to content

Commit 11e2f39

Browse files
committed
fix: handle potential error in get_current_user method by using the safe unwrap operator
1 parent 13fed8c commit 11e2f39

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • crates/shared/src/unix/mac

crates/shared/src/unix/mac/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ impl crate::system::System for MacSystem {
166166

167167
fn get_current_user(&self) -> Result<String> {
168168
log::debug!("MacSystem::get_current_user called");
169-
Ok(whoami::username())
169+
Ok(whoami::username()?)
170170
}
171171

172172
fn get_session_type(&self) -> Result<String> {

0 commit comments

Comments
 (0)