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(