From 5df11c81f997236a270cce4f268217ce0b219324 Mon Sep 17 00:00:00 2001 From: Daniel Valadas Date: Tue, 28 Nov 2023 16:12:05 -0500 Subject: [PATCH] Update azure-pipelines.yml for Azure Pipelines Ensures the yarn cache folder exists before doing yarn caching --- azure-pipelines.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 40a217b8185..d16b9649394 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -46,6 +46,19 @@ pr: steps: +- task: PowerShell@2 + displayName: 'Create Yarn Cache Folder' + inputs: + targetType: 'inline' + script: | + $yarnCacheFolder = "$(YARN_CACHE_FOLDER)" + if (-not (Test-Path $yarnCacheFolder)) { + Write-Host "Creating Yarn cache folder at $yarnCacheFolder" + New-Item -ItemType Directory -Path $yarnCacheFolder -Force + } else { + Write-Host "Yarn cache folder already exists." + } + - task: Cache@2 displayName: Cache Yarn packages inputs: