diff --git a/lib/main.js b/lib/main.js index 4233ba0..db5ca8c 100644 --- a/lib/main.js +++ b/lib/main.js @@ -33,14 +33,22 @@ module.exports = function (options) { errorCache = err; } else { var lines = stdout.split("\n"); + var collect = false; for(var i in lines) { if(lines[i] == 'Raw result:') { - qrcode = lines[parseInt(i)+1]; - break; + collect = true; + continue; + } + else if(lines[i] === 'Parsed result:') { + collect = false; + break; } - } + if(collect){ + qrcode += lines[parseInt(i)]; + } + } } cb(errorCache, qrcode); }