Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove "I: " prefix from Apktool logs
- Loading branch information
1 parent
d14c1c7
commit 0cb553e
Showing
4 changed files
with
22 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
import { ExecaChildProcess } from 'execa' | ||
import * as path from 'path' | ||
import { map } from 'rxjs/operators' | ||
|
||
import executeJar from '../utils/execute-jar' | ||
import observeProcess from '../utils/observe-process' | ||
|
||
const jar = path.join(__dirname, '../../jar/apktool.jar') | ||
|
||
const apktool = { | ||
decode(inputPath: string, outputPath: string) { | ||
return executeJar(jar, ['decode', inputPath, '--output', outputPath]) | ||
}, | ||
encode(inputPath: string, outputPath: string) { | ||
return executeJar(jar, ['build', inputPath, '--output', outputPath, '--use-aapt2']) | ||
}, | ||
decode: (inputPath: string, outputPath: string) => observeApktool( | ||
executeJar(jar, ['decode', inputPath, '--output', outputPath]), | ||
), | ||
encode: (inputPath: string, outputPath: string) => observeApktool( | ||
executeJar(jar, ['build', inputPath, '--output', outputPath, '--use-aapt2']), | ||
), | ||
version: 'v2.4.1 SNAPSHOT@197d46', | ||
} | ||
|
||
function observeApktool(process: ExecaChildProcess) { | ||
return map((line: string) => line.replace(/I: /g, ''))(observeProcess(process)) | ||
} | ||
|
||
export default apktool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters