Skip to content

Commit

Permalink
set cwd first thing after starting julia
Browse files Browse the repository at this point in the history
  • Loading branch information
pfitzseb committed Jul 9, 2019
1 parent e17892a commit 52f2e74
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/connection/local.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ module.exports =
proc = check
.then => @spawnJulia(path, args, provider)
.then (proc) => if proc.ty? then @monitor2(proc) else @monitor(proc)

# set working directory here, so we queue this task before anything else
if provider is 'Remote'
ssh.withRemoteConfig((conf) -> junorc conf.remote).catch ->
else
paths.projectDir().then (dir) -> junorc dir

proc
.then (proc) =>
Promise.all [proc, proc.socket]
Expand All @@ -106,11 +113,6 @@ module.exports =
.catch (e) ->
client.detach()
console.error("Julia exited with #{e}.")
.then =>
if provider is 'Remote'
ssh.withRemoteConfig((conf) -> junorc conf.remote).catch ->
else
paths.projectDir().then (dir) -> junorc dir
proc

spawnJulia: (path, args, provider) ->
Expand Down

0 comments on commit 52f2e74

Please sign in to comment.