Skip to content

Commit 230fd10

Browse files
committed
fixed #75 again: made WSL stop being incorrectly identified
1 parent 07ac516 commit 230fd10

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/dotfiles.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,10 @@ fn platform_is_under_wsl() -> bool {
202202
}
203203
}
204204

205-
std::fs::exists("/proc/sys/fs/binfmt_misc/WSLInterop").is_ok()
205+
matches!(
206+
std::fs::exists("/proc/sys/fs/binfmt_misc/WSLInterop"),
207+
Ok(true)
208+
)
206209
}
207210

208211
/// Returns true if a group with specified name can be used by current platform.
@@ -555,7 +558,9 @@ mod tests {
555558

556559
assert_eq!(
557560
Dotfile::try_from(group).unwrap().to_target_path().unwrap(),
558-
super::get_dotfiles_target_dir_path().unwrap().join(".zshrc")
561+
super::get_dotfiles_target_dir_path()
562+
.unwrap()
563+
.join(".zshrc")
559564
);
560565
}
561566

0 commit comments

Comments
 (0)