Skip to content

Commit

Permalink
shell_parse usage: escape characters that will soon be special
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Dec 31, 2016
1 parent 3b4491e commit 482def8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions base/managers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ function launch_on_machine(manager::SSHManager, machine, cnt, params, launched,

# the default worker timeout
tval = haskey(ENV, "JULIA_WORKER_TIMEOUT") ?
`export JULIA_WORKER_TIMEOUT=$(ENV["JULIA_WORKER_TIMEOUT"]);` : ``
`export JULIA_WORKER_TIMEOUT=$(ENV["JULIA_WORKER_TIMEOUT"])\;` : ``

# Julia process with passed in command line flag arguments
cmd = `cd $dir && $tval $exename $exeflags`
cmd = `cd $dir '&&' $tval $exename $exeflags`

# shell login (-l) with string command (-c) to launch julia process
cmd = `sh -l -c $(shell_escape(cmd))`
Expand Down
2 changes: 1 addition & 1 deletion test/replcompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ for (T, arg) in [(String,"\")\""),(Char, "')'")]
@test s[r] == "CompletionFoo.test2"
end

s = "(1, CompletionFoo.test2(`)`,"
s = "(1, CompletionFoo.test2(`')'`,"
c, r, res = test_complete(s)
@test c[1] == string(first(methods(Main.CompletionFoo.test2, Tuple{Cmd})))
@test length(c) == 1
Expand Down
2 changes: 1 addition & 1 deletion test/spawn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end

#### Examples used in the manual ####

@test readstring(`$echo hello | sort`) == "hello | sort\n"
@test readstring(`$echo hello \| sort`) == "hello | sort\n"
@test readstring(pipeline(`$echo hello`, sortcmd)) == "hello\n"
@test length(spawn(pipeline(`$echo hello`, sortcmd)).processes) == 2

Expand Down

0 comments on commit 482def8

Please sign in to comment.