Split on all newline characters

This commit is contained in:
Kevin Sawicki
2014-11-18 11:39:36 -08:00
parent 3ac992d5d5
commit 4bbc498d1d

View File

@@ -66,9 +66,10 @@ updatePath = (callback) ->
spawnReg ['query', environmentKeyPath, '/v', 'Path'], (error, stdout) ->
console.log error
console.log stdout
lines = stdout.split('\n')
segments = lines[lines.length - 1].split(' ')
pathSegment = segments[3..].join(' ')
lines = stdout.split(/[\r\n]+/)
console.log lines
segments = lines[lines.length - 1]?.split(' ')
pathSegment = segments?[3..].join(' ')
console.log pathSegment
callback()