diff --git a/packages/rollup/index.bzl b/packages/rollup/index.bzl index 3d6d74a7ea..dec64a5e86 100644 --- a/packages/rollup/index.bzl +++ b/packages/rollup/index.bzl @@ -143,6 +143,7 @@ function parseStatusFile(p) { return results; } +// This undefined variable will be replaced with the full path during the build. const statuses = parseStatusFile(bazel_version_file); // Parse the stamp file produced by Bazel from the version control system let version = ''; diff --git a/packages/rollup/index.js b/packages/rollup/index.js index 1bba45cdb4..4923ad28ba 100644 --- a/packages/rollup/index.js +++ b/packages/rollup/index.js @@ -239,6 +239,6 @@ async function main(args) { } } -if (require.main === module) { - main(process.argv.slice(2)).then(r => (process.exitCode = r)); -} +if (require.main == module) { + (async () => process.exitCode = await main(process.argv.slice(2)))(); +} \ No newline at end of file diff --git a/packages/rollup/test/version_stamp/rollup.config.js b/packages/rollup/test/version_stamp/rollup.config.js index 6ed85d752a..735cc8f472 100644 --- a/packages/rollup/test/version_stamp/rollup.config.js +++ b/packages/rollup/test/version_stamp/rollup.config.js @@ -32,6 +32,7 @@ const DEBUG = process.env['COMPILATION_MODE'] === 'dbg'; // Parse the stamp file produced by Bazel from the version control system let version = ''; +// This undefined variable will be replaced with the full path during the build. const statuses = parseStatusFile(bazel_version_file); // Don't assume BUILD_SCM_VERSION exists if (statuses['BUILD_SCM_VERSION']) {