INNER CODE UNIT · TypeScript
determineTask
niklashigi/apk-mitm · src/cli.ts:157
async function determineTask(inputPath: string) {
const fileStats = await fs.stat(inputPath)
let outputFileExtension = '.apk'
let skipDecode = false
let isAppBundle = false
let taskFunction: (options: TaskOptions) => Listr
if (fileStats.isDirectory()) {
taskFunction = patchApk
skipDecode = true
const apktoolYamlPath = path.join(inputPath, 'apktool.yml')
if (!(await fs.exists(apktoolYamlPath))) {
throw new UserError(
'No "apktool.yml" file found inside the input directory!' +
' Make sure to specify a directory created by "apktool decode".',