Skip to content

Commit

Permalink
chore: Include stdout as well if apksigner fails (#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed Sep 23, 2020
1 parent e128828 commit 2a12f8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/tools/apk-signing.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const DEFAULT_CERT_HASH = {
};


let apkSigningMethods = {};
const apkSigningMethods = {};

/**
* Execute apksigner utility with given arguments.
Expand Down Expand Up @@ -79,7 +79,7 @@ apkSigningMethods.signWithDefaultCert = async function signWithDefaultCert (apk)
await this.executeApksigner(args);
} catch (e) {
throw new Error(`Could not sign '${apk}' with the default certificate. ` +
`Original error: ${e.stderr || e.message}`);
`Original error: ${e.stderr || e.stdout || e.message}`);
}
};

Expand Down Expand Up @@ -107,7 +107,7 @@ apkSigningMethods.signWithCustomCert = async function signWithCustomCert (apk) {
apk]);
} catch (err) {
log.warn(`Cannot use apksigner tool for signing. Defaulting to jarsigner. ` +
`Original error: ${err.stderr || err.message}`);
`Original error: ${err.stderr || err.stdout || err.message}`);
try {
if (await unsignApk(apk)) {
log.debug(`'${apk}' has been successfully unsigned`);
Expand Down

0 comments on commit 2a12f8a

Please sign in to comment.