Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#2450) Enable configTransform and FilesSnapshot on non-Windows #2451

Merged
merged 2 commits into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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