Skip to content

Commit 33fd260

Browse files
committed
Fix build
1 parent d9ea421 commit 33fd260

File tree

1 file changed

+6
-2
lines changed
  • library/std/src/sys/unix

1 file changed

+6
-2
lines changed

library/std/src/sys/unix/os.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
451451
super::unsupported::unsupported()
452452
}
453453

454-
#[cfg(target_os = "fuchsia", target_os = "aix")]
454+
#[cfg(any(target_os = "fuchsia", target_os = "aix"))]
455455
pub fn current_exe() -> io::Result<PathBuf> {
456456
use crate::io::ErrorKind;
457457

@@ -469,7 +469,11 @@ pub fn current_exe() -> io::Result<PathBuf> {
469469

470470
// Prepend the current working directory to the path if it's not absolute.
471471
if cfg!(target_os = "fuchsia") {
472-
if !path.is_absolute() { getcwd().map(|cwd| cwd.join(path)) } else { Ok(path) }
472+
if !path.is_absolute() {
473+
return getcwd().map(|cwd| cwd.join(path));
474+
} else {
475+
return Ok(path);
476+
}
473477
}
474478

475479
if path.is_absolute() {

0 commit comments

Comments
 (0)