Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #95 from codecontemplator/bugfix/process-cwd-regre…
Browse files Browse the repository at this point in the history
…ssion

Bugfix process cwd regression
  • Loading branch information
codecontemplator committed Nov 3, 2015
2 parents 27cc412 + 7c68a09 commit 1fed5a2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/debugger.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,19 @@ class ProcessManager extends EventEmitter
.getActiveTextEditor()
.getPath()

dbgFile = file or appPath
cwd = path.dirname(dbgFile)

args = []
args = args.concat (nodeArgs.split(' ')) if nodeArgs
args.push "--debug-brk=#{port}"
args.push file or appPath
args.push dbgFile
args = args.concat (appArgs.split(' ')) if appArgs

logger.error 'spawn', {args:args, env:env}
@process = childprocess.spawn nodePath, args, {
detached: true
cwd: path.dirname(args[1])
cwd: cwd
env: env if env
}

Expand Down

0 comments on commit 1fed5a2

Please sign in to comment.