From 46ef9c45a3ad2336b7edb0b67ae69dd028ab256a Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Mon, 14 Aug 2017 09:06:47 +0300 Subject: [PATCH] Fix message when unable to find devices for LiveSync In case there are attached, but not trusted devices, `tns run ` 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. --- lib/services/livesync/livesync-command-helper.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/services/livesync/livesync-command-helper.ts b/lib/services/livesync/livesync-command-helper.ts index b1854e4e7a..c6e0334898 100644 --- a/lib/services/livesync/livesync-command-helper.ts +++ b/lib/services/livesync/livesync-command-helper.ts @@ -17,7 +17,11 @@ export class LiveSyncCommandHelper implements ILiveSyncCommandHelper { public async executeLiveSyncOperation(devices: Mobile.IDevice[], liveSyncService: ILiveSyncService, platform: string): Promise { if (!devices || !devices.length) { - this.$errors.failWithoutHelp("Unable to find applicable devices to execute operation and unable to start emulator when platform is not specified."); + if (platform) { + this.$errors.failWithoutHelp("Unable to find applicable devices to execute operation. Ensure connected devices are trusted and try again."); + } else { + this.$errors.failWithoutHelp("Unable to find applicable devices to execute operation and unable to start emulator when platform is not specified."); + } } const workingWithiOSDevices = !platform || this.$mobileHelper.isiOSPlatform(platform);