chore(build): Suppress spurious warnings from closure-make-deps (#6253)

A little bit of an ugly hack, but it works: pipe stderr through
grep -v to suppress error output starting with "WARNING in".
This commit is contained in:
Christopher Allen
2022-06-29 15:53:11 +01:00
committed by GitHub
parent 9eeb4fea0b
commit e36a10327f
+11 -4
View File
@@ -324,13 +324,20 @@ function buildDeps(done) {
];
const args = roots.map(root => `--root '${root}' `).join('');
execSync(`closure-make-deps ${args} > '${DEPS_FILE}'`,
{stdio: 'inherit'});
execSync(
`set -o pipefail; \
(closure-make-deps ${args} >'${DEPS_FILE}') 2>&1 \
| (grep -v '^WARNING in' ; true)`,
{stdio: 'inherit'});
// Use grep to filter out the entries that are already in deps.js.
const testArgs = testRoots.map(root => `--root '${root}' `).join('');
execSync(`closure-make-deps ${testArgs} | grep 'tests/mocha' ` +
`> '${TEST_DEPS_FILE}'`, {stdio: 'inherit'});
execSync(
`set -o pipefail; \
(closure-make-deps ${testArgs} | grep 'tests/mocha' \
> '${TEST_DEPS_FILE}') 2>&1 \
| (grep -v '^WARNING in' ; true)`,
{stdio: 'inherit'});
done();
};