-
Notifications
You must be signed in to change notification settings - Fork 17.3k
Unable to open a new window from command line when atom is already running #11480
Description
Prerequisites
- Can you reproduce the problem in safe mode?
- Are you running the latest version of Atom?
- Did you check the debugging guide?
- Did you check the FAQs on Discuss?
- Are you reporting to the correct repository?
- Did you perform a cursory search to see if your bug or enhancement is already reported?
Description
I spend a lot of time in CLI and I also open editors from there all the time. I've recently came back to atom, I updated it to 1.7.0 (now to 1.7.1) and opened atom in the current directory by atom .. This works correctly. But when I want to open another window in different directory atom . doesn't work anymore. I also tried the new atom -a . command and it doesn't work either.
I realised that atom . command works only when the editor is completely closed. Only when there is no instance running, I'm able to open it from CLI. But when it's already running, I'm unable to open a new window, or add it as a project to existing one.
To be precise, it looks like something happens there, atom starts opening, but then it quits. Atom just blinks in menu bar for a few ms and then disappears.
I also tried this with the recent beta. I found an error that happens there. When I open beta in CLI like this $ /Applications/Atom\ Beta.app/Contents/MacOS/Atom, the atom opens:
$ /Applications/Atom\ Beta.app/Contents/MacOS/Atom
2016-04-15 11:36:48.812 Atom[92173:6330910] App load time: 289ms
Then when I try to open a new window with atom-beta ., I see this error in beta log:
2016-04-15 11:38:38.176 Atom[92173:6330910] Unexpected end of input
2016-04-15 11:38:38.183 Atom[92173:6330910] SyntaxError: Unexpected end of input
at Object.parse (native)
at Socket.<anonymous> (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/browser/atom-application.js:244:28)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at Socket.Readable.push (_stream_readable.js:110:10)
at Pipe.onread (net.js:523:20)
2016-04-15 11:38:38.184 Atom[92173:6330910] Unexpected token .
2016-04-15 11:38:38.185 Atom[92173:6330910] SyntaxError: Unexpected token .
at Object.parse (native)
at Socket.<anonymous> (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/browser/atom-application.js:244:28)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at Socket.Readable.push (_stream_readable.js:110:10)
at Pipe.onread (net.js:523:20)
Steps to Reproduce
- Open atom (doesn't matter if via CLI, or normally)
- When atom is running, go to CLI and try to open atom with
atom .
Expected behavior: I would expect new window to opened.
Actual behavior: Nothing happens.
Versions
OS X: 10.11.4
Atom : 1.7.1
Electron: 0.36.8
Chrome : 47.0.2526.110
Node : 5.1.1
apm 1.9.2
npm 2.13.3
node 0.10.40
python 2.7.10
git 2.4.4
I've also tried it on beta with no luck either:
Atom : 1.8.0-beta1
Electron: 0.36.8
Chrome : 47.0.2526.110
Node : 5.1.1