Skip to content

Fixed: TNS run command broken with using --watch#2305

Merged
tzraikov merged 1 commit intomasterfrom
raikov/fix-2150
Dec 9, 2016
Merged

Fixed: TNS run command broken with using --watch#2305
tzraikov merged 1 commit intomasterfrom
raikov/fix-2150

Conversation

@tzraikov
Copy link
Contributor

@tzraikov tzraikov commented Dec 2, 2016

Fixes #2150

@tzraikov tzraikov self-assigned this Dec 5, 2016
@KristinaKoeva
Copy link
Contributor

It seems to me that passing boolean parameter to the runPlatform, deployOnDevice and deployOnEmulator overcomplicates the interface. I would suggest separating the methods, so that you can call something like the following in your command

public executeCore(args: string[], buildConfig?: IBuildConfig): IFuture<void> {
                this.$platformService.deploy(args[0], buildConfig).wait();
   		if (this.$options.watch) {
  			return this.$usbLiveSyncService.liveSync(args[0]);
  		}

                return this.$platformService.startApplication(args[0], buildConfig).wait();
 	}

Where the deploy method would be responsible only for deploying an application on device/simulator and the startApplication would be responsible only for running an application on device/simulator

@tzraikov tzraikov force-pushed the raikov/fix-2150 branch 3 times, most recently from 04abe6c to 390853f Compare December 8, 2016 14:19
@tzraikov tzraikov merged commit 99ba0fc into master Dec 9, 2016
@tzraikov tzraikov deleted the raikov/fix-2150 branch December 9, 2016 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants