Fix revision bundling
Summary: This fixes headless not terminating due to the `package.json` not being readable. I instead write this to the `global` object in the same way that the version is set. Reviewed By: jknoxville Differential Revision: D14579316 fbshipit-source-id: 238afe912366c423552305e120088f4abac4c20b
This commit is contained in:
committed by
Facebook Github Bot
parent
57a24769e8
commit
939cc531e2
@@ -23,6 +23,10 @@ const getPackageJSON = async () => {
|
||||
|
||||
export const readCurrentRevision: () => Promise<?string> = lodash.memoize(
|
||||
async () => {
|
||||
// This is provided as part of the bundling process for headless.
|
||||
if (global.__REVISION__) {
|
||||
return global.__REVISION__;
|
||||
}
|
||||
const json = await getPackageJSON();
|
||||
return json.revision;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user