-
Notifications
You must be signed in to change notification settings - Fork 904
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When running PowerShell operations, use a built-in PowerShell host by default, allowing fallback to the older method of running Posh by calling an external process. By building against the oldest version of System.Management.Automation that aligns with the oldest Windows Operating Systems supported, we can guarantee this will work on every version of Windows where Chocolatey is supported. In case we do run into issues, attempt to resolve the PowerShell assemblies starting from the newest version and falling down to the older versions until one is resolved or no version is resolved. There is a known assembly that will go through this process every time - System.Management.Automation.resources, en-US. To see those assemblies go through, one must ask for both debug and verbose output. This reverts the changes for GH-249 in 9936876 and the changes from GH-349 in 344268b so that both paths (system powershell and choco's built-in PowerShell) run with similar output and because by default in d523e7b (GH-445) choco no longer fails on the presence of stderr output.
- Loading branch information
1 parent
2c298b6
commit 7d2b82d
Showing
1 changed file
with
238 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters