Fix build-plugin script
Summary: This diff fixes "build-plugin" script which is failing for fb-internal plugins, because "fb/package.json" not exist. Because of that release of "fb/mobilebuilds" plugin failed recently: https://www.internalfb.com/intern/sandcastle/job/13510799309874638. Reviewed By: passy Differential Revision: D28624924 fbshipit-source-id: e00da98cfef992f5d49045afc9d404764a0d13ac
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4dd3b3e8ba
commit
d57c4d687c
@@ -87,10 +87,9 @@ async function buildPlugin() {
|
||||
const packageJsonBackupPath = path.join(tmpDir, 'package.json');
|
||||
await fs.copy(packageJsonPath, packageJsonBackupPath, {overwrite: true});
|
||||
try {
|
||||
const packageJsonOverride =
|
||||
(await fs.readJson(packageJsonOverridePath, {
|
||||
throws: false,
|
||||
})) ?? {};
|
||||
const packageJsonOverride = (await fs.pathExists(packageJsonOverridePath))
|
||||
? await fs.readJson(packageJsonOverridePath)
|
||||
: {};
|
||||
const packageJson = Object.assign(
|
||||
await fs.readJson(packageJsonPath),
|
||||
packageJsonOverride,
|
||||
|
||||
Reference in New Issue
Block a user