From 769235dd125ecf9a9f165fb77c91894c52c68285 Mon Sep 17 00:00:00 2001 From: Thomas Christensen Date: Mon, 11 May 2020 23:42:05 -0400 Subject: [PATCH] Fix for Windows cmd I was trying out Remark.jl on Windows and noticed that their call to `open`, which uses DefaultApplication.jl, didn't work. From a bit of searching, it seems the `start` cmd command needs a title text (https://superuser.com/a/1335757). I'm not really sure whether `start` is even required here. Anyway, changing this worked for me. (On the other hand, I don't quite understand why e.g. it works fine with the .txt file from `DefaultApplication.test()` - which indeed it does.) Thanks! --- src/DefaultApplication.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DefaultApplication.jl b/src/DefaultApplication.jl index 5d19a93..9abfc56 100644 --- a/src/DefaultApplication.jl +++ b/src/DefaultApplication.jl @@ -16,7 +16,7 @@ function open(filename; wait = false) run(`xdg-open $(filename)`; wait = wait) elseif Sys.iswindows() cmd = get(ENV, "COMSPEC", "cmd") - run(`$(ENV["COMSPEC"]) /c start $(filename)`; wait = wait) + run(`$(cmd) /c start "" $(filename)`; wait = wait) else @warn("Opening files the default application is not supported on this OS.", KERNEL = Sys.KERNEL)