This repository was archived by the owner on Feb 25, 2022. It is now read-only.
File tree 2 files changed +5
-4
lines changed
packages/react-native/src/builders
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { join } from 'path';
6
6
import { getProjectRoot } from '../../utils/get-project-root' ;
7
7
import { fork } from 'child_process' ;
8
8
import { ensureNodeModulesSymlink } from '../../utils/ensure-node-modules-symlink' ;
9
+ import { platform } from 'os' ;
9
10
10
11
export interface ReactNativeRunIOsOptions extends JsonObject {
11
12
configuration : string ;
@@ -25,14 +26,17 @@ function run(
25
26
options : ReactNativeRunIOsOptions ,
26
27
context : BuilderContext
27
28
) : Observable < ReactNativeRunIOsOutput > {
29
+ if ( platform ( ) !== 'darwin' ) {
30
+ throw new Error ( `The run-ios build requires OSX to run` ) ;
31
+ }
28
32
return from ( getProjectRoot ( context ) ) . pipe (
29
33
tap ( ( root ) => ensureNodeModulesSymlink ( context . workspaceRoot , root ) ) ,
30
34
switchMap ( ( root ) =>
31
35
from ( runCliRunIOS ( context . workspaceRoot , root , options ) )
32
36
) ,
33
37
map ( ( ) => {
34
38
return {
35
- success : true
39
+ success : true ,
36
40
} ;
37
41
} )
38
42
) ;
Original file line number Diff line number Diff line change @@ -25,9 +25,6 @@ function run(
25
25
options : ReactNativeDevServerOptions ,
26
26
context : BuilderContext
27
27
) : Observable < ReactNativeDevServerBuildOutput > {
28
- if ( platform ( ) !== 'darwin' ) {
29
- throw new Error ( `The run-ios build requires OSX to run` ) ;
30
- }
31
28
return from ( getProjectRoot ( context ) ) . pipe (
32
29
tap ( ( root ) => ensureNodeModulesSymlink ( context . workspaceRoot , root ) ) ,
33
30
switchMap ( ( root ) =>
You can’t perform that action at this time.
0 commit comments