Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/helpers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ else
# https://github.com/JuliaLang/julia/pull/57069
function detectwsl()
# We use the same approach as canonical/snapd do to detect WSL
islinux() && (
Sys.islinux() && (
isfile("/proc/sys/fs/binfmt_misc/WSLInterop")
|| isdir("/run/WSL")
)
Expand Down
2 changes: 2 additions & 0 deletions test/utilities_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@
@test PkgAuthentication.assert_dict_keys(Dict("bar" => 0), "foo", "bar"; msg="") === nothing
@test_throws ErrorException PkgAuthentication.assert_dict_keys(Dict(), "foo", "bar"; msg="")
@test_throws ErrorException PkgAuthentication.assert_dict_keys(Dict("baz" => 0), "foo", "bar"; msg="")

@test PkgAuthentication.detectwsl() isa Bool
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is a bit contrived, but this should at least exercise the code path now.

end
Loading