diff --git a/private/react-native-fantom/runner/EnvironmentOptions.js b/private/react-native-fantom/runner/EnvironmentOptions.js index ea47b4795a0..5ef51192b83 100644 --- a/private/react-native-fantom/runner/EnvironmentOptions.js +++ b/private/react-native-fantom/runner/EnvironmentOptions.js @@ -107,6 +107,14 @@ export function validateEnvironmentVariables(): void { } } + if (isCI && debugCpp) { + throw new Error('Cannot run Fantom with C++ debugging on CI'); + } + + if (isCI && profileCpp) { + throw new Error('Cannot run Fantom with C++ profiling on CI'); + } + // Enabling memory instrumentation is only necessary when taking JS heap // snapshots in optimized builds (where it is disabled by default). // This isn't supported in CI or in OSS because that would require adding diff --git a/private/react-native-fantom/runner/executables/tester.js b/private/react-native-fantom/runner/executables/tester.js index 05b09edb6ec..d6a48fbb75d 100644 --- a/private/react-native-fantom/runner/executables/tester.js +++ b/private/react-native-fantom/runner/executables/tester.js @@ -125,14 +125,6 @@ export function run( options: TesterOptions, env: EnvironmentOverrides, ): AsyncCommandResult { - if (isCI && debugCpp) { - throw new Error('Cannot run Fantom with C++ debugging on CI'); - } - - if (isCI && profileCpp) { - throw new Error('Cannot run Fantom with C++ profiling on CI'); - } - if (!isCI && !debugCpp) { build(options, env); }