Skip to content

Commit

Permalink
Improve error detection from stderr when Apktool is running
Browse files Browse the repository at this point in the history
  • Loading branch information
FrenchYeti committed May 15, 2020
1 parent 70ee757 commit 849ecd3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/ApkHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const Utils = require('./Utils');
const Logger = require("./Logger")();
const DexcaliburWorkspace = require("./DexcaliburWorkspace");

const EOL = require('os').EOL;


/**
Expand Down Expand Up @@ -114,8 +115,15 @@ class ApkHelper


if(stderr){
console.log("err:",stderr);
return false;
stderr = stderr.split(EOL);
let no_err = true;
stderr.map(x =>{
console.log(x);
if(x.startsWith('E:')) no_err = false;
});

// throw exception
return no_err;
}else{
Logger.info("[APK HELPER] APK extracted into : "+pDestination);
return true;
Expand Down

0 comments on commit 849ecd3

Please sign in to comment.