Skip to content

Commit

Permalink
fix: Use module log instance
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed Jun 5, 2023
1 parent 92cf0f6 commit 8571666
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/wda-mac.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ class WDAMacProcess {
try {
boxItem = await box.createItemWithContents(RECENT_MODULE_VERSION_ITEM_NAME, '1.5.4');
} catch (e) {
this.log.warn(`The actual module version cannot be persisted: ${e.message}`);
log.warn(`The actual module version cannot be persisted: ${e.message}`);
return;
}
} else {
this.log.info('There is no need to perform the project cleanup. A fresh install has been detected');
log.info('There is no need to perform the project cleanup. A fresh install has been detected');
try {
await box.createItemWithContents(RECENT_MODULE_VERSION_ITEM_NAME, packageInfo.version);
} catch (e) {
this.log.warn(`The actual module version cannot be persisted: ${e.message}`);
log.warn(`The actual module version cannot be persisted: ${e.message}`);
}
return;
}
Expand All @@ -113,14 +113,14 @@ class WDAMacProcess {
try {
recentModuleVersion = util.coerceVersion(recentModuleVersion, true);
} catch (e) {
this.log.warn(`The persisted module version string has been damaged: ${e.message}`);
this.log.info(`Updating it to '${packageInfo.version}' assuming the project clenup is not needed`);
log.warn(`The persisted module version string has been damaged: ${e.message}`);
log.info(`Updating it to '${packageInfo.version}' assuming the project clenup is not needed`);
await boxItem.write(packageInfo.version);
return;
}

if (util.compareVersions(recentModuleVersion, '>=', packageInfo.version)) {
this.log.info(
log.info(
`WebDriverAgent does not need a cleanup. The project sources are up to date ` +
`(${recentModuleVersion} >= ${packageInfo.version})`
);
Expand Down

0 comments on commit 8571666

Please sign in to comment.