Skip to content

Commit 7868d3f

Browse files
committed
2 parents a6c4adf + 7bf6084 commit 7868d3f

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
0.1.8 (2/23/2015)
2+
-------------------
3+
* Fix issues launching phone emulator seen on some setups/foreign languages
4+
15
0.1.7 (1/8/2015)
26
-------------------
37
* Remove use of custom wptool, defer to deploy cmd for launch/connect [TIMOB-18303]

lib/wptool.js

+11-17
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function enumerate(options, callback) {
9696
next(ex, null);
9797
} else {
9898
// Parse the output! Hope this regex is OK!
99-
var deviceListingRE = /^\s*(\d+)\s+([\w \.]+)$/mg
99+
var deviceListingRE = /^\s*(\d+)\s+([\w \.]+)/mg
100100
deviceListingRE.exec(out); // skip device
101101
var emulators = [];
102102
var match;
@@ -245,23 +245,17 @@ function connect(udid, options, callback) {
245245

246246
child.on('close', function (code) {
247247
clearTimeout(abortTimer);
248+
249+
var errmsg = out.trim().split(/\r\n|\n/).shift(),
250+
ex = new Error(/^Error: /.test(errmsg) ? errmsg.substring(7) : __('Failed to start %s (code %s)', dev.name, code));
248251
// Here's where we expect the failure that the app is not installed, which is right.
249-
if (code == -2146233088) {
250-
var errmsg = out.trim().split(/\r\n|\n/).shift(),
251-
ex = new Error(/^Error: /.test(errmsg) ? errmsg.substring(7) : __('Failed to start %s (code %s)', dev.name, code));
252-
if (errmsg == 'Error: The application is not installed.') {
253-
// we must be successful, right?
254-
emitter.emit('connected', dev);
255-
callback(null, dev);
256-
} else {
257-
// we sometimes get the same code, but different error message
258-
emitter.emit('error', ex);
259-
callback(ex);
260-
}
261-
}
262-
else {
263-
var errmsg = out.trim().split(/\r\n|\n/).shift(),
264-
ex = new Error(/^Error: /.test(errmsg) ? errmsg.substring(7) : __('Failed to start %s (code %s)', dev.name, code));
252+
// if (code == -2146233088 || code == 2148734208)
253+
if (errmsg.indexOf('The application is not installed.') != -1) {
254+
// we must be successful, right?
255+
emitter.emit('connected', dev);
256+
callback(null, dev);
257+
} else {
258+
// we sometimes get the same code, but different error message
265259
emitter.emit('error', ex);
266260
callback(ex);
267261
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "windowslib",
3-
"version": "0.1.7",
3+
"version": "0.1.8",
44
"description": "Windows Phone Utility Library",
55
"keywords": [
66
"appcelerator",

0 commit comments

Comments
 (0)