@@ -40,7 +40,8 @@ export class PlatformEnvironmentRequirements implements IPlatformEnvironmentRequ
4040 "deploy" : "tns cloud deploy"
4141 } ;
4242
43- public async checkEnvironmentRequirements ( platform ?: string , projectDir ?: string , runtimeVersion ?: string ) : Promise < ICheckEnvironmentRequirementsOutput > {
43+ public async checkEnvironmentRequirements ( input : ICheckEnvironmentRequirementsInput ) : Promise < ICheckEnvironmentRequirementsOutput > {
44+ const { platform, projectDir, runtimeVersion, options } = input ;
4445 let selectedOption = null ;
4546
4647 if ( process . env . NS_SKIP_ENV_CHECK ) {
@@ -84,7 +85,7 @@ export class PlatformEnvironmentRequirements implements IPlatformEnvironmentRequ
8485
8586 await this . processCloudBuildsIfNeeded ( selectedOption , platform ) ;
8687 this . processManuallySetupIfNeeded ( selectedOption , platform ) ;
87- await this . processSyncToPreviewAppIfNeeded ( selectedOption , projectDir ) ;
88+ await this . processSyncToPreviewAppIfNeeded ( selectedOption , projectDir , options ) ;
8889
8990 if ( selectedOption === PlatformEnvironmentRequirements . LOCAL_SETUP_OPTION_NAME ) {
9091 await this . $doctorService . runSetupScript ( ) ;
@@ -182,7 +183,7 @@ export class PlatformEnvironmentRequirements implements IPlatformEnvironmentRequ
182183 }
183184 }
184185
185- private async processSyncToPreviewAppIfNeeded ( selectedOption : string , projectDir : string ) {
186+ private async processSyncToPreviewAppIfNeeded ( selectedOption : string , projectDir : string , options : IOptions ) {
186187 if ( selectedOption === PlatformEnvironmentRequirements . SYNC_TO_PREVIEW_APP_OPTION_NAME ) {
187188 if ( ! projectDir ) {
188189 this . $errors . failWithoutHelp ( `No project found. In order to sync to playground you need to go to project directory or specify --path option.` ) ;
@@ -191,10 +192,10 @@ export class PlatformEnvironmentRequirements implements IPlatformEnvironmentRequ
191192 await this . $previewAppLiveSyncService . initialSync ( {
192193 projectDir,
193194 appFilesUpdaterOptions : {
194- bundle : false ,
195- release : false
195+ bundle : ! ! options . bundle ,
196+ release : options . release
196197 } ,
197- env : null
198+ env : options . env
198199 } ) ;
199200 }
200201 }
0 commit comments