eitri-cli 1.13.0-beta.2 → 1.13.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
package/package.json
CHANGED
|
@@ -100,16 +100,23 @@ module.exports = class AndroidEmulatorService {
|
|
|
100
100
|
|
|
101
101
|
return new Promise((resolve, _reject) => {
|
|
102
102
|
exec('adb devices -l', (error, stdout, _stderr) => {
|
|
103
|
-
const adbDevices = []
|
|
104
103
|
if (error) {
|
|
105
104
|
console.error(`Erro ao executar o comando: ${error}`);
|
|
105
|
+
resolve([]);
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
if(!stdout || stdout.trim() === ""){
|
|
110
|
+
console.error(`'adb devices -l' vazio ou nulo: ${error}`);
|
|
111
|
+
resolve([]);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const adbDevices = []
|
|
116
|
+
const devicesList = stdout?.split('\n');
|
|
117
|
+
const devices = devicesList?.slice(1, -2);
|
|
111
118
|
|
|
112
|
-
devices
|
|
119
|
+
devices?.forEach(device => {
|
|
113
120
|
adbDevices.push(device)
|
|
114
121
|
});
|
|
115
122
|
resolve(adbDevices)
|