Skip to content

Commit

Permalink
We also need to wrap each arg in quotes when sent to socket
Browse files Browse the repository at this point in the history
  • Loading branch information
BKaperick committed Dec 17, 2023
1 parent a58e161 commit 6eaa259
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/DaemonMode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ end

function serverRun(run, sock, shared, print_stack, fname, args, reviser)
error = false

println("args = $args")
try
reviser()

Expand Down Expand Up @@ -429,6 +429,7 @@ function serverRunFile(sock, shared, print_stack, reviser)
fname = readline(sock)
args_str = readline(sock)
args = parse_arguments(args_str)
println("parsing args: $args_str => $args")

if !isempty(args) && isempty(args[1])
empty!(args)
Expand Down Expand Up @@ -547,7 +548,7 @@ function runfile(fname::AbstractString; args=String[], port = PORT, output=stdou
println(sock, token_runfile)
println(sock, pwd())
println(sock, fcompletename)
println(sock, join(args, " "))
println(sock, string("\"", join(args, "\" \""), "\""))
line = readline(sock)
token_size = length(token_ok_end)

Expand Down

0 comments on commit 6eaa259

Please sign in to comment.