Skip to content

Fixed: "tns emulate android" fails with a space in the name of the home directory #2413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 12, 2017

Conversation

tzraikov
Copy link
Contributor

@tzraikov tzraikov commented Jan 12, 2017

Fixes #2380

@tzraikov tzraikov self-assigned this Jan 12, 2017
} else {
this.$devicesService.initialize({ platform: platform, deviceId: this.$options.device }).wait();
let found: Mobile.IDeviceInfo[] = [];
if (this.$devicesService.hasDevices) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is necessary because deployPlatform method calls $devicesService.execute method in order to deploy on all specified devices:
https://github.com/NativeScript/nativescript-cli/blob/master/lib/services/platform-service.ts#L435

The execute method however starts the default emulator when there are no connected devices:
https://github.com/telerik/mobile-cli-lib/blob/9b2d88f4b23247e601fccb35be45c411ea3ddf87/mobile/mobile-core/devices-service.ts#L318

All this is not expected when executing tns emulate <platform> --device <device_id>. The expected result is to fail with the following message:
"Cannot find device with name: <device_id>" as specified by our QAs. Note that this message is different from ERROR_NO_DEVICES message.
This code comes from PR #2412

@tzraikov tzraikov force-pushed the raikov/fix-space-emulator-path branch from 6fd9dd3 to 326e0f2 Compare January 12, 2017 12:08
@tzraikov tzraikov force-pushed the raikov/fix-space-emulator-path branch from 326e0f2 to 9fa6755 Compare January 12, 2017 12:09
@tzraikov tzraikov merged commit 1e3abdd into master Jan 12, 2017
@tzraikov tzraikov deleted the raikov/fix-space-emulator-path branch January 12, 2017 14:34
tzraikov added a commit that referenced this pull request Jan 12, 2017
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.

2 participants