From a83c58d54f1628ea120d9e95902afee1cb22c8af Mon Sep 17 00:00:00 2001 From: Ella Hathaway <67609881+ellahathaway@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:37:08 -0800 Subject: [PATCH] Update owner of artifacts staging directory for offline builds (#45489) --- eng/pipelines/templates/jobs/vmr-build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml index a59dc39e5c57..5903dae5a770 100644 --- a/eng/pipelines/templates/jobs/vmr-build.yml +++ b/eng/pipelines/templates/jobs/vmr-build.yml @@ -432,6 +432,13 @@ jobs: displayName: Build workingDirectory: $(sourcesPath) + - ${{ if ne(parameters.runOnline, 'True' )}}: + - script: | + set -ex + # Update the owner of the staging directory to the current user + sudo chown -R $(whoami) $(artifactsStagingDir) + displayName: Update owner of artifacts staging directory + # Only run tests if enabled - ${{ if eq(parameters.runTests, 'True') }}: # Setup the NuGet sources used by the tests to use private feeds. This is necessary when testing internal-only product