Skip to content

Commit

Permalink
Merge pull request #2451 from TheCakeIsNaOH/snapshot-transform
Browse files Browse the repository at this point in the history
(#2450) Enable configTransform and FilesSnapshot on non-Windows
  • Loading branch information
gep13 authored Jan 10, 2022
2 parents 44d7969 + a256c27 commit f0040ca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3298,8 +3298,6 @@ public void should_have_a_version_of_one_dot_zero_dot_zero()
}

[Concern(typeof(ChocolateyInstallCommand))]
[WindowsOnly]
[Platform(Exclude = "Mono")]
public class when_installing_a_package_with_config_transforms : ScenariosBase
{
private PackageResult packageResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2818,8 +2818,6 @@ public void should_not_have_warning_package_result()
}

[Concern(typeof(ChocolateyUpgradeCommand))]
[WindowsOnly]
[Platform(Exclude = "Mono")]
public class when_upgrading_a_package_with_config_transforms : ScenariosBase
{
private PackageResult _packageResult;
Expand Down Expand Up @@ -2916,8 +2914,6 @@ public void should_add_the_insertNew_value_in_the_config_due_to_XDT_InsertIfMiss
}

[Concern(typeof(ChocolateyUpgradeCommand))]
[WindowsOnly]
[Platform(Exclude = "Mono")]
public class when_upgrading_a_package_with_config_transforms_when_config_was_edited : ScenariosBase
{
private PackageResult _packageResult;
Expand Down
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 f0040ca

Please sign in to comment.