diff --git a/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs b/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs index 6400acb4d1..6be5884c88 100644 --- a/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs +++ b/src/chocolatey/infrastructure.app/services/ChocolateyPackageService.cs @@ -814,10 +814,14 @@ public virtual ConcurrentDictionary upgrade_run(Chocolate private void before_package_modify(PackageResult packageResult, ChocolateyConfiguration config) { - if (!config.SkipPackageInstallProvider) + if (!config.SkipPackageInstallProvider && config.Information.PlatformType == PlatformType.Windows) { _powershellService.before_modify(config, packageResult); } + else + { + if (config.Information.PlatformType != PlatformType.Windows) this.Log().Info(ChocolateyLoggers.Important, () => " Skipping beforemodify Powershell script due to non-Windows."); + } } public void uninstall_noop(ChocolateyConfiguration config)