mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
[codex] Make AbsolutePathBuf joins infallible (#16981)
Having to check for errors every time join is called is painful and unnecessary.
This commit is contained in:
committed by
GitHub
Unverified
parent
0b9e42f6f7
commit
f1a2b920f9
@@ -112,10 +112,8 @@ pub fn try_find_pwsh_executable_blocking() -> Option<AbsolutePathBuf> {
|
||||
{
|
||||
let candidate = AbsolutePathBuf::resolve_path_against_base("pwsh.exe", &ps_home);
|
||||
|
||||
if let Ok(candidate_abs_path) = candidate
|
||||
&& is_powershellish_executable_available(candidate_abs_path.as_path())
|
||||
{
|
||||
return Some(candidate_abs_path);
|
||||
if is_powershellish_executable_available(candidate.as_path()) {
|
||||
return Some(candidate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user