From 303b6532c1047e9f07d3a658a4b97a3ce15b94f7 Mon Sep 17 00:00:00 2001 From: TheCakeIsNaOH Date: Sat, 13 Nov 2021 16:53:53 -0600 Subject: [PATCH] (#2450) Enable configTransform and FilesSnapshot on non-Windows This runs configTransformService and capture_package_files on non-Windows platforms. Both appear to be fully functional, so there is no reason not to run them. They were added to non-Windows side of the if/else instead of being moved from the Windows side so as to not screw up the functionality of create_ignore_files_for_executables. --- .../infrastructure.app/services/ChocolateyPackageService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs b/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs index 6400acb4d1..8a456754f4 100644 --- a/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs +++ b/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs @@ -386,7 +386,6 @@ public virtual void handle_package_result(PackageResult packageResult, Chocolate _filesService.ensure_compatible_file_attributes(packageResult, config); _configTransformService.run(packageResult, config); - //review: is this a Windows only kind of thing? pkgInfo.FilesSnapshot = _filesService.capture_package_files(packageResult, config); var is32Bit = !config.Information.Is64BitProcess || config.ForceX86; @@ -397,6 +396,11 @@ public virtual void handle_package_result(PackageResult packageResult, Chocolate else { if (config.Information.PlatformType != PlatformType.Windows) this.Log().Info(ChocolateyLoggers.Important, () => " Skipping Powershell and shimgen portions of the install due to non-Windows."); + if (packageResult.Success) + { + _configTransformService.run(packageResult, config); + pkgInfo.FilesSnapshot = _filesService.capture_package_files(packageResult, config); + } } if (packageResult.Success)