open click-to-open editor in foreground for windows (#14307)

spent a lot of hours trying to figure out why did the editor window not open in the foreground on windows.

The fix was super simple  : /
Needed to add `detached: true` option in child_process.spawn call

Fixes: https://github.com/vercel/next.js/issues/14016
This commit is contained in:
Darsh Patel 2020-06-22 10:43:55 +05:30 committed by GitHub
parent eead55cbaf
commit 19f3306aaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -399,6 +399,7 @@ function launchEditor(fileName: string, lineNumber: number, colNumber: number) {
// launch .exe files.
p = child_process.spawn('cmd.exe', ['/C', editor].concat(args), {
stdio: 'inherit',
detached: true,
})
} else if (isTerminalEditor(editor)) {
if (process.platform === 'darwin') {