Skip to content

Commit

Permalink
Added More verbose output to dev console
Browse files Browse the repository at this point in the history
  • Loading branch information
racerxdl committed Aug 17, 2017
1 parent c2e85e6 commit 83b8380
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/components/signer.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ async function getFingerPrint(gpgKey) {
console.log(`Error getting fingerprint (${error}): ${stderr}`);
reject(error);
} else {
console.log(`gpg --list-keys output:\n${stdout}`);
const s = stdout.split(':');
if (s.length > 4) {
resolve(s[4].trim());
Expand All @@ -43,6 +44,7 @@ async function _sign(body, gpgKey) {
console.log(`Error signign data (${error}): ${stderr}`);
reject(error);
} else {
console.log(`gpg -u ${fingerPrint} --clearsign output:\n${stdout}`);
// Grab only the signature hash
const hash = stdout.match(hashReg);
const rm = stdout.match(reg);
Expand All @@ -65,6 +67,7 @@ async function _sign(body, gpgKey) {
hash: hash[1],
});
} else {
console.log('Error: Cannot find signature in stdout!');
reject('cannot find signature on stdout');
}
}
Expand All @@ -83,6 +86,7 @@ async function _getAvailableKeys() {
console.log(`Error getting list of keys (${error}): ${stderr}`);
reject(error);
} else {
console.log(`gpg --list-secret-keys --with-colon |grep sec output:\n${stdout}`);
const keysS = stdout.trim().split('\n');
const keys = [];
keysS.forEach((k) => {
Expand Down

0 comments on commit 83b8380

Please sign in to comment.