From 8dc0155ecb83b3734361de556be488d3ac3133e8 Mon Sep 17 00:00:00 2001 From: Cory Knox Date: Wed, 14 Aug 2024 14:58:20 -0700 Subject: [PATCH] Pull from Gary's commit because I need it. --- .../infrastructure.app/services/ChocolateyPackageService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs b/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs index fc9b292606..46e9a95b6a 100644 --- a/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs +++ b/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs @@ -1925,6 +1925,11 @@ public virtual void MarkPackagePending(PackageResult packageResult, ChocolateyCo return; } + if (!_fileSystem.DirectoryExists(packageDirectory)) + { + return; + } + if (packageDirectory.IsEqualTo(ApplicationParameters.InstallLocation) || packageDirectory.IsEqualTo(ApplicationParameters.PackagesLocation)) { packageResult.Messages.Add(