Skip to content

Commit

Permalink
set the working directory for the kernel to wherever the file is
Browse files Browse the repository at this point in the history
  • Loading branch information
willwhitney committed May 19, 2015
1 parent bd34534 commit 23446f7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/kernel.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ class Kernel

console.log "launching kernel:", commandString
@connect()
@kernelProcess = child_process.exec(commandString)
# projectPath = atom.project.getPaths()[0]
projectPath = path.dirname(atom.workspace.getActiveTextEditor().getPath())
if projectPath?
@kernelProcess = child_process.exec(commandString, {
cwd: projectPath
})
else
@kernelProcess = child_process.exec(commandString)

# exec commandString, (error, stdout, stderr) ->
# console.log 'stdout: ', stdout
Expand Down

0 comments on commit 23446f7

Please sign in to comment.