added a missing check

This commit is contained in:
antelle 2020-05-24 18:42:14 +02:00
parent 81d4c5c403
commit b5fddeb627
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
1 changed files with 6 additions and 0 deletions

View File

@ -188,11 +188,17 @@ const YubiKey = {
},
getOtp(serial, entry, callback) {
if (this.process) {
return callback('Already in progress');
}
this.aborted = false;
return Launcher.spawn({
cmd: 'ykman',
args: ['-d', serial, 'oath', 'code', '--single', entry],
noStdOutLogging: true,
complete: (err, stdout) => {
this.process = null;
if (err) {
return callback(err);
}