File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ import Pkg
66import Random
77import TOML
88
9+ include (" helpers.jl" )
10+
911const pkg_server_env_var_name = " JULIA_PKG_SERVER"
1012
1113# # abstract state types
@@ -520,8 +522,8 @@ function open_browser(url::AbstractString)
520522 @debug " error executing browser hook" exception= (err, catch_backtrace ())
521523 return false
522524 end
523- elseif Sys. iswindows ()
524- run (` cmd /c "start $url "` ; wait= false )
525+ elseif Sys. iswindows () || detectwsl ()
526+ run (` cmd.exe /c "start $url "` ; wait= false )
525527 elseif Sys. isapple ()
526528 run (` open $url ` ; wait= false )
527529 elseif Sys. islinux () || Sys. isbsd ()
Original file line number Diff line number Diff line change 1+ # Vendored from Pluto.jl#src/notebook/path helpers.jl
2+ # from https://github.com/JuliaLang/julia/pull/36425
3+ function detectwsl ()
4+ Sys. islinux () &&
5+ isfile (" /proc/sys/kernel/osrelease" ) &&
6+ occursin (r" Microsoft|WSL" i , read (" /proc/sys/kernel/osrelease" , String))
7+ end
You can’t perform that action at this time.
0 commit comments