зеркало из https://github.com/microsoft/rnx-kit.git
fix(cli): `projectDir` is only set in recent versions (#3317)
This commit is contained in:
Родитель
e14ca25d72
Коммит
4783503e19
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@rnx-kit/cli": patch
|
||||
---
|
||||
|
||||
`projectDir` is only set in recent versions of `@react-native-community/cli`
|
|
@ -29,8 +29,10 @@
|
|||
/packages/*/*.LICENSE.txt
|
||||
/packages/*/*/rnx-build/
|
||||
/packages/*/dist/
|
||||
/packages/*/ios/DerivedData/
|
||||
/packages/*/ios/build/
|
||||
/packages/*/lib/
|
||||
/packages/*/macos/DerivedData/
|
||||
/packages/*/macos/build/
|
||||
/packages/template/CHANGELOG.md
|
||||
/scripts/bin/
|
||||
|
|
|
@ -13,7 +13,9 @@ export function buildIOS(
|
|||
const { sourceDir, xcodeProject } = config.project[platform] ?? {};
|
||||
if (!sourceDir || !xcodeProject) {
|
||||
const root = platform.substring(0, platform.length - 2);
|
||||
logger.fail(`No ${root}OS project was found`);
|
||||
logger.fail(
|
||||
`No ${root}OS project was found; did you forget to run 'pod install'?`
|
||||
);
|
||||
process.exitCode = 1;
|
||||
return Promise.resolve(1);
|
||||
}
|
||||
|
@ -27,6 +29,8 @@ export function buildIOS(
|
|||
return Promise.resolve(1);
|
||||
}
|
||||
|
||||
const xcworkspace = path.resolve(sourceDir, projectDir, name);
|
||||
const xcworkspace = projectDir
|
||||
? path.resolve(sourceDir, projectDir, name)
|
||||
: path.resolve(sourceDir, name);
|
||||
return runBuild(xcworkspace, buildParams, logger);
|
||||
}
|
||||
|
|
|
@ -15,11 +15,6 @@ export function rnxRun(
|
|||
return runIOS(config, buildParams);
|
||||
case "macos":
|
||||
return runMacOS(config, buildParams);
|
||||
default:
|
||||
// @ts-expect-error Safe guard against user input
|
||||
console.error(`Unsupported platform: ${buildParams.platform}`);
|
||||
process.exitCode = 1;
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче