Restart Atom with project path from focused window

Closes #4653
This commit is contained in:
Kevin Sawicki 2014-12-16 15:25:15 -08:00
parent 5147fb6a8b
commit fdd55dfd27

View File

@ -182,7 +182,9 @@ exports.existsSync = ->
# Restart Atom using the version pointed to by the atom.cmd shim
exports.restartAtom = ->
app.once 'will-quit', -> spawn(path.join(binFolder, 'atom.cmd'))
if projectPath = global.atomApplication?.lastFocusedWindow?.projectPath
args = [projectPath]
app.once 'will-quit', -> spawn(path.join(binFolder, 'atom.cmd'), args)
app.quit()
# Handle squirrel events denoted by --squirrel-* command line arguments.