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: