mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Split on all newline characters
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user