Skip to content

Commit 82ce3df

Browse files
Merge pull request #3425 from NativeScript/kerezov/bundle-both-platforms-fail
feat: fail if bundling both platforms
2 parents c3c594b + 730bed9 commit 82ce3df

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/helpers/livesync-command-helper.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ export class LiveSyncCommandHelper implements ILiveSyncCommandHelper {
3131
await this.$devicesService.detectCurrentlyAttachedDevices({ shouldReturnImmediateResult: false, platform: platform });
3232
const devices = this.$devicesService.getDeviceInstances()
3333
.filter(d => !platform || d.deviceInfo.platform.toLowerCase() === platform.toLowerCase());
34+
35+
const devicesPlatforms = _(devices).map(d => d.deviceInfo.platform).uniq().value();
36+
if (this.$options.bundle && devicesPlatforms.length > 1) {
37+
this.$errors.failWithoutHelp("Bundling doesn't work with multiple platforms. Please specify platform to the run command.");
38+
}
39+
3440
await this.executeLiveSyncOperation(devices, platform, additionalOptions);
3541
}
3642

0 commit comments

Comments
 (0)