Skip to content

Commit 0602eb5

Browse files
feat: fail if bundling both platforms
This is currently not possible so throw an error if this is the case
1 parent 97d72e9 commit 0602eb5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/commands/run.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ export class RunCommandBase extends BundleBase implements ICommand {
6060
await this.$devicesService.detectCurrentlyAttachedDevices({ shouldReturnImmediateResult: false, platform: this.platform });
6161
let devices = this.$devicesService.getDeviceInstances();
6262
devices = devices.filter(d => !this.platform || d.deviceInfo.platform.toLowerCase() === this.platform.toLowerCase());
63+
const devicesPlatforms = _(devices).map(d => d.deviceInfo.platform).uniq().value();
64+
if (this.$options.bundle && devicesPlatforms.length > 1) {
65+
this.$errors.failWithoutHelp("Bundling doesn't work with multiple platforms. Please specify platform to the run command.");
66+
}
67+
6368
await this.$liveSyncCommandHelper.executeLiveSyncOperation(devices, this.platform);
6469
}
6570
}

0 commit comments

Comments
 (0)