Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always use open on osx #2039

Closed
brigand opened this issue Apr 27, 2017 · 1 comment
Closed

Always use open on osx #2039

brigand opened this issue Apr 27, 2017 · 1 comment

Comments

@brigand
Copy link

brigand commented Apr 27, 2017

Bringing this up for discussion. I don't know the rationale for the current behavior. I realize this is a bit of an edge case, and not the highest priority issue. I'll PR if there's interest.

Description

I run two instances of chrome on my computer. create-react-app is the only program that opens in the second browser instance on OSX.

To reproduce (warning, will use some HD space):

env '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' --user-data-dir=~/.chrome-profile/foo

Leave that running, and then npm start in another terminal.

It opens in the second chrome instance.

Expected behavior

Should follow the normal OSX behavior of opening in the primary chrome instance, like open http://localhost:3000 does, or chat clients, etc.

Actual behavior

Opens in second instance.

Environment

$ npm ls react-scripts
super-counter@0.1.0 <dir>
└── react-scripts@0.9.5
$ node -v
v6.10.0
$ npm -v
3.10.10
  1. Operating system: OSX
  2. Browser and version: Chrome stable
@gaearon
Copy link
Contributor

gaearon commented May 1, 2017

It happens because we try to reuse the existing tab when opening Chrome, and this is only possible with AppleScript (rather than opn). It seems that reusing existing tab is more valuable to most people than supporting running two instances of Chrome so I think this is in wontfix territory.

However you can force it to just use opn directly by passing BROWSER=open (this might work on master only).

@gaearon gaearon closed this as completed May 1, 2017
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants