From aec94508fe1bf62d7195d9ed585ec8c709136d8a Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Wed, 2 Sep 2020 15:01:52 +0200 Subject: [PATCH] Use default value cmd.exe for ENV["COMSPEC"] --- src/DefaultApplication.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DefaultApplication.jl b/src/DefaultApplication.jl index 5d19a93..ff70bd5 100644 --- a/src/DefaultApplication.jl +++ b/src/DefaultApplication.jl @@ -15,8 +15,8 @@ function open(filename; wait = false) elseif Sys.islinux() || Sys.isbsd() run(`xdg-open $(filename)`; wait = wait) elseif Sys.iswindows() - cmd = get(ENV, "COMSPEC", "cmd") - run(`$(ENV["COMSPEC"]) /c start $(filename)`; wait = wait) + cmd = get(ENV, "COMSPEC", "cmd.exe") + run(`$(cmd) /c start $(filename)`; wait = wait) else @warn("Opening files the default application is not supported on this OS.", KERNEL = Sys.KERNEL)