mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Remove --version spawn from debugger shell preparation (#56706)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/56706 Addresses an issue where on macOS, we briefly flashed the RNDT app icon in the Dock. (This has been raised to us recently by Expo.) **More info** The `unstable_prepareDebuggerShell` health check was spawning the Electron binary with `--version` after a successful `dotslash fetch`. Invoking the native binary causes the app icon flash. - I couldn't find an Electron-side way to eliminate this (e.g. headless). - DotSlash already performs mandatory verification of every fetched artifact. The additional `--version` spawn was therefore redundant/overkill. Changelog: [General][Fixed] - React Native DevTools will no longer briefly flash in the system dock/taskbar when starting Metro Reviewed By: cortinico Differential Revision: D104061238 fbshipit-source-id: 5baafbc9a452438bb6ddcfb584975cae12618e0c
This commit is contained in:
1 parent
b4966128af
commit
6aa7e35ec3
2 files changed
+2
-19
No files matched your search
@@ -8,10 +8,7 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {
|
||||
prepareDebuggerShellFromDotSlashFile,
|
||||
spawnAndGetStderr,
|
||||
} from './private/LaunchUtils';
|
||||
import {prepareDebuggerShellFromDotSlashFile} from './private/LaunchUtils';
|
||||
|
||||
const {spawn} = require('cross-spawn');
|
||||
const debug = require('debug')('Metro:DebuggerShell');
|
||||
@@ -174,20 +171,6 @@ async function unstable_prepareDebuggerShell({
|
||||
throw new Error(`Unknown flavor: ${flavor}`);
|
||||
}
|
||||
|
||||
const [binaryPath, baseArgs] = getShellBinaryAndArgs(
|
||||
flavor,
|
||||
prebuiltBinaryPath,
|
||||
);
|
||||
const {code, stderr} = await spawnAndGetStderr(binaryPath, [
|
||||
...baseArgs,
|
||||
'--version',
|
||||
]);
|
||||
if (code !== 0) {
|
||||
return {
|
||||
code: 'unexpected_error',
|
||||
verboseInfo: stderr,
|
||||
};
|
||||
}
|
||||
return {code: 'success'};
|
||||
} catch (e) {
|
||||
return {
|
||||
|
||||
@@ -95,4 +95,4 @@ async function prepareDebuggerShellFromDotSlashFile(
|
||||
};
|
||||
}
|
||||
|
||||
export {spawnAndGetStderr, prepareDebuggerShellFromDotSlashFile};
|
||||
export {prepareDebuggerShellFromDotSlashFile};
|
||||
Reference in new issue
Block a user