Skip to content

Commit

Permalink
(chocolatey#2450) Enable functions on non-Windows systems
Browse files Browse the repository at this point in the history
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 authored and gep13 committed Jan 10, 2022
1 parent 44d7969 commit f02a2e6
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 f02a2e6

Please sign in to comment.