Skip to content

Commit

Permalink
(chocolatey#2450) Enable configTransform and FilesSnapshot on non-Win…
Browse files Browse the repository at this point in the history
…dows

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.
  • Loading branch information
TheCakeIsNaOH committed Dec 24, 2021
1 parent c76012d commit 303b653
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit 303b653

Please sign in to comment.