Skip to content

Don't remove packagesFolder if it already exists #3910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions AppHandling/Run-AlPipeline.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -875,10 +875,12 @@ if ($updateLaunchJson) {

if ($useCompilerFolder -or $filesOnly -or !$useDevEndpoint) {
$packagesFolder = CheckRelativePath -baseFolder $baseFolder -sharedFolder $sharedFolder -path $packagesFolder -name "packagesFolder"
if (Test-Path $packagesFolder) {
Remove-Item $packagesFolder -Recurse -Force
if (!($bcContainerHelperConfig.doNotRemovePackagesFolderIfExists)) {
if (Test-Path $packagesFolder) {
Remove-Item $packagesFolder -Recurse -Force
}
}
New-Item $packagesFolder -ItemType Directory | Out-Null
New-Item $packagesFolder -ItemType Directory -Force | Out-Null
}

if ($useDevEndpoint) {
Expand Down
1 change: 1 addition & 0 deletions BC.HelperFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ function Get-ContainerHelperConfig {
"useApproximateVersion" = $false
"useSqlServerModule" = $false
"NuGetSearchResultsCacheRetentionPeriod" = 600 # 10 minutes
"doNotRemovePackagesFolderIfExists" = $false
}

if ($isInsider) {
Expand Down
1 change: 1 addition & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Fixes issues determining test symbols for W1 and OnPrem artifacts not containing
Add cache for search results of a NuGet feed
Add new setting NuGetSearchResultsCacheRetentionPeriod (default: 600) to set the retention period (in seconds) for the search result cache of NuGet feeds (0 to disable the cache)
Download-BcNuGetPackageToFolder checks all direct dependency versions of a package based on the NuSpec before downloading the whole package and its dependencies
New Option doNotRemovePackagesFolderIfExists to prevent Run-ALPipeline from deleting the packages folder, if it already exists. Default is false
Add support for Windows 2025 Containers

6.1.3
Expand Down