Skip to content

Commit

Permalink
fix: just warn whjen app couldn't be installed
Browse files Browse the repository at this point in the history
Signed-off-by: Hanno J. Gödecke <die.drei99@yahoo.de>
  • Loading branch information
hannojg committed Oct 14, 2022
1 parent a65387c commit f64cab1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion e2e/utils/installApp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const {APP_PACKAGE} = require('../config');
const execAsync = require('./execAsync');
const Logger = require('./Logger');

const APP_PATH_FROM_ROOT = 'android/app/build/outputs/apk/e2eRelease/app-e2eRelease.apk';

Expand All @@ -15,5 +16,8 @@ module.exports = function (platform = 'android') {
}

// Uninstall first, then install
return execAsync(`adb uninstall ${APP_PACKAGE}`).finally(() => execAsync(`adb install ${APP_PATH_FROM_ROOT}`));
return execAsync(`adb uninstall ${APP_PACKAGE}`).catch((e) => {
// Ignore errors
Logger.warn('Failed to uninstall app:', e);
}).finally(() => execAsync(`adb install ${APP_PATH_FROM_ROOT}`));
};
2 changes: 1 addition & 1 deletion e2e/utils/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const info = (...args) => {
};

const warn = (...args) => {
const lines = [`${COLOR_YELLOW}⚠️`, ...args, `${COLOR_RESET}`];
const lines = [`\n${COLOR_YELLOW}⚠️`, ...args, `${COLOR_RESET}\n`];
console.debug(...lines);
log(...lines);
};
Expand Down

0 comments on commit f64cab1

Please sign in to comment.