Strictify adbConfig
Summary: As per title Reviewed By: passy Differential Revision: D17285741 fbshipit-source-id: 8d2693c09d5dfa6d71cb6aedbb0504d09200f4ac
This commit is contained in:
committed by
Facebook Github Bot
parent
6df299425e
commit
a35fd7389f
@@ -6,7 +6,13 @@
|
||||
*/
|
||||
|
||||
export default () => {
|
||||
let port = parseInt(process.env.ANDROID_ADB_SERVER_PORT, 10) || 5037;
|
||||
const serverPortString = process.env.ANDROID_ADB_SERVER_PORT;
|
||||
let port = 5037;
|
||||
if (serverPortString) {
|
||||
const parsedInt = parseInt(serverPortString, 10);
|
||||
port = isNaN(parsedInt) ? port : parsedInt;
|
||||
}
|
||||
|
||||
let host = 'localhost';
|
||||
|
||||
const socket = (process.env.ADB_SERVER_SOCKET || '').trim();
|
||||
|
||||
Reference in New Issue
Block a user