Remove error logging from getting the build info
MODIFY
lib/appium.js
lib/appium.js
@@ -149,6 +149,7 @@ class AppiumDriver extends BaseDriver {
// It is not recommended to access this property directly from the outside
this.pendingDrivers = {};
+ // allow this to happen in the background, so no `await`
updateBuildInfo();
}

MODIFY
lib/config.js
lib/config.js
@@ -40,10 +40,7 @@ async function getGitRev (useGitHubFallback = false) {
cwd: rootDir
});
return stdout.trim();
- } catch (err) {
- logger.warn(`Cannot retrieve git revision for Appium version ${APPIUM_VER} from the local repository. ` +
- `Original error: ${err.message}`);
- }
+ } catch (ign) {}
}
if (!useGitHubFallback) {
@@ -64,10 +61,7 @@ async function getGitRev (useGitHubFallback = false) {
}
}
}
- } catch (err) {
- logger.warn(`Cannot retrieve git revision for Appium version ${APPIUM_VER} from GitHub. ` +
- `Original error: ${err.message}`);
- }
+ } catch (ign) {}
return null;
}
@@ -78,10 +72,7 @@ async function getGitTimestamp (commitSha, useGitHubFallback = false) {
cwd: rootDir
});
return stdout.trim();
- } catch (err) {
- logger.warn(`Cannot retrieve the timestamp for Appium git commit ${commitSha} from the local repository. ` +
- `Original error: ${err.message}`);
- }
+ } catch (ign) {}
}
if (!useGitHubFallback) {
@@ -103,10 +94,7 @@ async function getGitTimestamp (commitSha, useGitHubFallback = false) {
return resBodyObj.commit.author.date;
}
}
- } catch (err) {
- logger.warn(`Cannot retrieve the timestamp for Appium git commit ${commitSha} from GitHub. ` +
- `Original error: ${err.message}`);
- }
+ } catch (ign) {}
return null;
}

Remove error logging from getting the build info (#11499)