Fix error message
This commit is contained in:
+2
-2
@@ -67,14 +67,14 @@ function gpgVerify(file, sig, callback) {
|
||||
child_process.exec(cmd, { encoding: 'utf8' }, function (error, stdout, stderr) {
|
||||
if (error) {
|
||||
debug(`gpgVerify: command failed. error: ${error}\n stdout: ${stdout}\n stderr: ${stderr}`);
|
||||
return callback(new BoxError(BoxError.NOT_SIGNED, `The signature in ${path.basename(sig)} could not verified (command failed)`));
|
||||
return callback(new BoxError(BoxError.NOT_SIGNED, `The signature in ${path.basename(sig)} could not be verified (command failed)`));
|
||||
}
|
||||
|
||||
if (stdout.indexOf('[GNUPG:] VALIDSIG 0EADB19CDDA23CD0FE71E3470A372F8703C493CC') !== -1) return callback();
|
||||
|
||||
debug(`gpgVerify: verification of ${sig} failed: ${stdout}\n${stderr}`);
|
||||
|
||||
return callback(new BoxError(BoxError.NOT_SIGNED, `The signature in ${path.basename(sig)} could not verified (bad sig)`));
|
||||
return callback(new BoxError(BoxError.NOT_SIGNED, `The signature in ${path.basename(sig)} could not be verified (bad sig)`));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user