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

Commit 1fed5a2

Browse files
Merge pull request #95 from codecontemplator/bugfix/process-cwd-regression
Bugfix process cwd regression
2 parents 27cc412 + 7c68a09 commit 1fed5a2

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

lib/debugger.coffee

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,19 @@ class ProcessManager extends EventEmitter
3535
.getActiveTextEditor()
3636
.getPath()
3737

38+
dbgFile = file or appPath
39+
cwd = path.dirname(dbgFile)
40+
3841
args = []
3942
args = args.concat (nodeArgs.split(' ')) if nodeArgs
4043
args.push "--debug-brk=#{port}"
41-
args.push file or appPath
44+
args.push dbgFile
4245
args = args.concat (appArgs.split(' ')) if appArgs
4346

4447
logger.error 'spawn', {args:args, env:env}
4548
@process = childprocess.spawn nodePath, args, {
4649
detached: true
47-
cwd: path.dirname(args[1])
50+
cwd: cwd
4851
env: env if env
4952
}
5053

0 commit comments

Comments
 (0)