diff --git a/base/interactiveutil.jl b/base/interactiveutil.jl index 1d569265a3773..12663bb92363a 100644 --- a/base/interactiveutil.jl +++ b/base/interactiveutil.jl @@ -61,9 +61,10 @@ function edit(path::AbstractString, line::Integer=0) end if is_windows() && name == "open" - systemerror(:edit, ccall((:ShellExecuteW,"shell32"), stdcall, Int, - (Ptr{Void}, Cwstring, Cwstring, Ptr{Void}, Ptr{Void}, Cint), - C_NULL, "open", path, C_NULL, C_NULL, 10) ≤ 32) + @static is_windows() && # don't emit this ccall on other platforms + systemerror(:edit, ccall((:ShellExecuteW, "shell32"), stdcall, Int, + (Ptr{Void}, Cwstring, Cwstring, Ptr{Void}, Ptr{Void}, Cint), + C_NULL, "open", path, C_NULL, C_NULL, 10) ≤ 32) elseif background spawn(pipeline(cmd, stderr=STDERR)) else