CB-12546: account for quotes when detecting android command error for Windows.

This commit is contained in:
filmaj 2017-03-15 15:35:29 -07:00
parent 884818934f
commit 2f2e8a560d

View File

@ -122,7 +122,7 @@ module.exports.list_targets = function() {
.catch(function(err) { .catch(function(err) {
// there's a chance `android` no longer works. // there's a chance `android` no longer works.
// lets see if `sdkmanager` is available and we can figure it out // lets see if `sdkmanager` is available and we can figure it out
var avail_regex = /android command is no longer available/; var avail_regex = /"?android"? command is no longer available/;
if (err.code && ((err.stdout && err.stdout.match(avail_regex)) || (err.stderr && err.stderr.match(avail_regex)))) { if (err.code && ((err.stdout && err.stdout.match(avail_regex)) || (err.stderr && err.stderr.match(avail_regex)))) {
return module.exports.list_targets_with_sdkmanager(); return module.exports.list_targets_with_sdkmanager();
} else throw err; } else throw err;