From 107823fc2ce4896abfa329b9e1a8ab9894bc987d Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 19 Nov 2020 14:43:08 -0800 Subject: [PATCH] fix: use realpath when scanning app files --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 1b4bda0..91f733b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -78,7 +78,7 @@ export const makeUniversalApp = async (opts: MakeUniversalOpts): Promise = const uniqueToX64: string[] = []; const uniqueToArm64: string[] = []; const x64Files = await getAllAppFiles(await fs.realpath(tmpApp)); - const arm64Files = await getAllAppFiles(opts.arm64AppPath); + const arm64Files = await getAllAppFiles(await fs.realpath(opts.arm64AppPath)); for (const file of dupedFiles(x64Files)) { if (!arm64Files.some((f) => f.relativePath === file.relativePath)) @@ -252,6 +252,7 @@ export const makeUniversalApp = async (opts: MakeUniversalOpts): Promise = } d('moving final universal app to target destination'); + await fs.mkdirp(path.dirname(opts.outAppPath)); await spawn('mv', [tmpApp, opts.outAppPath]); } catch (err) { throw err;