Skip to content

Commit ffc7661

Browse files
Fix message when unable to find devices for LiveSync (#3058)
In case there are attached, but not trusted devices, `tns run <platform>` command prints error that it is unable to find devices and cannot start emulator when platform is not specified. But the platform has been specified, so improve the error message in such cases.
1 parent 7605f81 commit ffc7661

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/services/livesync/livesync-command-helper.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ export class LiveSyncCommandHelper implements ILiveSyncCommandHelper {
1717

1818
public async executeLiveSyncOperation(devices: Mobile.IDevice[], liveSyncService: ILiveSyncService, platform: string): Promise<void> {
1919
if (!devices || !devices.length) {
20-
this.$errors.failWithoutHelp("Unable to find applicable devices to execute operation and unable to start emulator when platform is not specified.");
20+
if (platform) {
21+
this.$errors.failWithoutHelp("Unable to find applicable devices to execute operation. Ensure connected devices are trusted and try again.");
22+
} else {
23+
this.$errors.failWithoutHelp("Unable to find applicable devices to execute operation and unable to start emulator when platform is not specified.");
24+
}
2125
}
2226

2327
const workingWithiOSDevices = !platform || this.$mobileHelper.isiOSPlatform(platform);

0 commit comments

Comments
 (0)