fix: website build

This commit is contained in:
Cheng Liu 2024-08-26 22:13:19 -07:00
parent 4e3dc95663
commit 250f2c5663
No known key found for this signature in database
GPG key ID: EEC8452F7DB85CD6

View file

@ -1,7 +1,18 @@
const { spawnSync } = require('child_process');
function runCommand(command, args) {
const result = spawnSync(command, args, { stdio: 'inherit', shell: true });
const result = spawnSync(command, args, {
stdio: 'inherit',
shell: true,
env: {
...process.env,
// Suppress the "Browserslist: caniuse-lite is outdated" warning. Although the warning is
// potentially useful, the check is performed in a way that is nondeterministic and can cause
// Rush pipelines to fail. Moreover, the outdated version is often irrelevant and/or nontrivial
// to upgrade. See this thread for details: https://github.com/microsoft/rushstack/issues/2981
BROWSERSLIST_IGNORE_OLD_DATA: '1'
}
});
if (result.error) {
console.log(result.error.message);
process.exitCode = 1;