From 04fd4d824d9e76d5f779f540b5153d9baae442eb Mon Sep 17 00:00:00 2001 From: Alexander Marks Date: Fri, 10 Jun 2022 14:22:29 -0700 Subject: [PATCH] Temporary CI fix for npm bug (#290) Context: https://github.com/npm/cli/issues/4980, https://github.com/lit/lit/pull/3011 --- src/test/util/test-rig.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/test/util/test-rig.ts b/src/test/util/test-rig.ts index 5808da7eb..d1b9fa613 100644 --- a/src/test/util/test-rig.ts +++ b/src/test/util/test-rig.ts @@ -269,7 +269,15 @@ class ExecResult { code, signal, stdout: this.#stdout, - stderr: this.#stderr, + // TODO(aomarks) Temporary fix for + // https://github.com/npm/cli/issues/4980#issuecomment-1145334203. + // Remove when resolved. + stderr: IS_WINDOWS + ? this.#stderr.replace( + /npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.\n/, + '' + ) + : this.#stderr, }); });