diff --git a/packages/build-tools/src/steps/functions/installNodeModules.ts b/packages/build-tools/src/steps/functions/installNodeModules.ts index e07555c2..cb72548b 100644 --- a/packages/build-tools/src/steps/functions/installNodeModules.ts +++ b/packages/build-tools/src/steps/functions/installNodeModules.ts @@ -25,7 +25,7 @@ export async function installNodeModules( env: BuildStepEnv ): Promise { const { logger } = stepCtx; - const packageManager = resolvePackageManager(stepCtx.global.projectTargetDirectory); + const packageManager = resolvePackageManager(stepCtx.workingDirectory); const packagerRunDir = findPackagerRootDir(stepCtx.workingDirectory); let args = ['install']; if (packageManager === PackageManager.PNPM) { diff --git a/packages/build-tools/src/steps/functions/prebuild.ts b/packages/build-tools/src/steps/functions/prebuild.ts index ac3602c2..2a52c5c5 100644 --- a/packages/build-tools/src/steps/functions/prebuild.ts +++ b/packages/build-tools/src/steps/functions/prebuild.ts @@ -34,7 +34,7 @@ export function createPrebuildBuildFunction(): BuildFunction { fn: async (stepCtx, { inputs, env }) => { const { logger } = stepCtx; const appleTeamId = inputs.apple_team_id.value as string | undefined; - const packageManager = resolvePackageManager(stepCtx.global.projectTargetDirectory); + const packageManager = resolvePackageManager(stepCtx.workingDirectory); assert(stepCtx.global.staticContext.job, 'Job is not defined'); const job = stepCtx.global.staticContext.job;