Skip to content

Commit

Permalink
fix(cli): ensure cwd and outputDir are used for finding files (#1949)
Browse files Browse the repository at this point in the history
  • Loading branch information
andymac4182 committed Feb 16, 2024
1 parent 5ac1533 commit 6aae4ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/src/api/universalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function universalizeBinaries(userOptions: UniversalizeOptions) {
}

const srcFiles = UniArchsByPlatform[process.platform]?.map(
(arch) => `${config.binaryName}.${process.platform}-${arch}.node`,
(arch) => resolve(options.cwd, options.outputDir, `${config.binaryName}.${process.platform}-${arch}.node`),
)

if (!srcFiles || !universalizers[process.platform]) {
Expand All @@ -56,7 +56,7 @@ export async function universalizeBinaries(userOptions: UniversalizeOptions) {
debug(' %O', srcFiles)

const srcFileLookup = await Promise.all(
srcFiles.map((f) => fileExists(resolve(options.cwd, options.outputDir, f))),
srcFiles.map((f) => fileExists(f)),
)

const notFoundFiles = srcFiles.filter((_, i) => !srcFileLookup[i])
Expand Down

0 comments on commit 6aae4ba

Please sign in to comment.