From 8e301305c97308673244ec7deb217ecdb4e803ec Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Fri, 15 Sep 2023 18:02:10 -0700 Subject: [PATCH] Ignore errors from "rush purge" (#2430) - Workaround for microsoft/rushstack#4334 - Partially fixes Azure/typespec-azure#3473 --- eng/pipelines/jobs/build-and-test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/jobs/build-and-test.yml b/eng/pipelines/jobs/build-and-test.yml index b0c3ccc5bf..e4bc9d4506 100644 --- a/eng/pipelines/jobs/build-and-test.yml +++ b/eng/pipelines/jobs/build-and-test.yml @@ -36,9 +36,10 @@ steps: # Unlink node_modules folders to significantly improve performance of subsequent tasks # which need to walk the directory tree (and are hardcoded to follow symlinks). - - script: node common/scripts/install-run-rush.js purge + # Append "|| cd ." to command to ignore errors (works on both Windows and Linux) as a workaround + # for microsoft/rushstack#4334. + - script: node common/scripts/install-run-rush.js purge || cd . displayName: "Purge dependencies" - continueOnError: true # Some issue with deleting common/temp/rush-recycler folder on linux. This doesn't matter for the next steps. condition: always() # It's important for performance to pass "packages" as "searchFolder" to avoid looking under root "node_modules".