From e36a10327f02f994da0d9b78ffce7f84f07bab68 Mon Sep 17 00:00:00 2001 From: Christopher Allen Date: Wed, 29 Jun 2022 15:53:11 +0100 Subject: [PATCH] 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". --- scripts/gulpfiles/build_tasks.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/gulpfiles/build_tasks.js b/scripts/gulpfiles/build_tasks.js index b02ec0ac9..708da39ed 100644 --- a/scripts/gulpfiles/build_tasks.js +++ b/scripts/gulpfiles/build_tasks.js @@ -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(); };