XRJulia icon indicating copy to clipboard operation
XRJulia copied to clipboard

juliaCMD doesn't quote testFile path on Windows (with fix)

Open alansz opened this issue 6 years ago • 0 comments

XRJulia 0.7.7, on Windows 10, with successful findJulia, with a user account name that has a space:

juliaEval("1+1") ERROR: could not open file C:\Users\Alan Stacktrace: [1] include_from_node1(::String) at .\loading.jl:576 [2] include(::String) at .\sysimg.jl:14 [3] process_options(::Base.JLOptions) at .\client.jl:305 [4] _start() at .\client.jl:371 Error in .Object$initialize(...) : No JSON module in Julia and unable to add: try in julia

This fixes the problem by adding quotes around the testFile, just as they are added around julia_bin in juliaCMD:

assignInNamespace("juliaCMD", function (julia_bin, testFile) { if (.Platform$OS.type == "windows") paste0(""", julia_bin, "" ", paste0(""",testFile,""")) else paste(julia_bin, "<", testFile) }, "XRJulia")

alansz avatar Jul 21 '18 15:07 alansz