From ea6b6f0f495d68e53f78b9552e2b26139ed0f609 Mon Sep 17 00:00:00 2001 From: praveenkuttappan Date: Wed, 25 May 2022 20:06:53 -0400 Subject: [PATCH 1/2] Create json package property parent directory --- eng/common/scripts/Save-Package-Properties.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eng/common/scripts/Save-Package-Properties.ps1 b/eng/common/scripts/Save-Package-Properties.ps1 index db2470dbd0..516bab3956 100644 --- a/eng/common/scripts/Save-Package-Properties.ps1 +++ b/eng/common/scripts/Save-Package-Properties.ps1 @@ -108,6 +108,12 @@ if ($allPackageProperties) } $outputPath = Join-Path -Path $outDirectory "$configFilePrefix.json" Write-Host "Output path of json file: $outputPath" + $outDir = Split-Path $outputPath -parent + if (-not (Test-Path -path outDir)) + { + Write-Host "Creating directory $($outDir) for json property file" + New-Item -ItemType Directory -Path $outDir + } SetOutput $outputPath $pkg } From af6c416569a95b8ad9c34ca7910bc1696868197e Mon Sep 17 00:00:00 2001 From: praveenkuttappan Date: Wed, 25 May 2022 20:35:25 -0400 Subject: [PATCH 2/2] Fix the issue in script --- eng/common/scripts/Save-Package-Properties.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/scripts/Save-Package-Properties.ps1 b/eng/common/scripts/Save-Package-Properties.ps1 index 516bab3956..6fb9e61ee0 100644 --- a/eng/common/scripts/Save-Package-Properties.ps1 +++ b/eng/common/scripts/Save-Package-Properties.ps1 @@ -109,7 +109,7 @@ if ($allPackageProperties) $outputPath = Join-Path -Path $outDirectory "$configFilePrefix.json" Write-Host "Output path of json file: $outputPath" $outDir = Split-Path $outputPath -parent - if (-not (Test-Path -path outDir)) + if (-not (Test-Path -path $outDir)) { Write-Host "Creating directory $($outDir) for json property file" New-Item -ItemType Directory -Path $outDir