Skip to content

Commit d15bb53

Browse files
committed
.
1 parent 87c9b49 commit d15bb53

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

git-config/src/values.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ quick_error! {
299299
}
300300
Pwd {
301301
display("User home info missing")
302+
from()
302303
}
303304
Unsupported {
304305
display("Not available on this platform")
@@ -369,7 +370,8 @@ impl Path<'_> {
369370
.ok_or(PathError::Missing { what: "/" })?;
370371
let (username, val) = val.split_at(i);
371372
let username = std::str::from_utf8(username)?;
372-
let home = Passwd::from_name(username)?
373+
let home = Passwd::from_name(username)
374+
.map_err(|_| PathError::Pwd)
373375
.ok_or(PathError::Missing { what: "pwd user info" })?
374376
.dir;
375377
let mut expanded = home.as_bytes().to_owned();

0 commit comments

Comments
 (0)