Previously powershell.exe treated unknown arguments as a command line to execute. To align with POSIX so that things like shebang scripts work correctly, we are changing powershell.exe so that it treats unknown arguments (aka positional argument) as a file. This means that `powershell foo` will now attempt to use `foo` as a PowerShell script whereas previously `foo` would be treated as a command to execute. This doesn't affect existing usage of either -File nor -Command. Fixed tests that didn't explicitly use -Command parameter.
Invoke-WebRequest and Invoke-RestMethod cmdlets will now strip authorization header on redirect unless the new parameter `-PreserveAuthorizationOnRedirect` is specified.
The FullCLR implementation uses WebRequest to perform the request which silently strips the Authorization header when a redirect occurs.
The CoreCLR implementation uses HttpClient to perform the request which does not strip the authorization header. The change explicitly handles the initial redirect, removes the authorization header and submits the request to location in the response.
Fixes#2227
* Fix SSH process creation on Linux platforms
* Fixed typos
* Added UNIX managed code StartProcess
* Fixed compile errors
* Changed process create to return pid
* Now resolve full SSH command file path for all platforms
* Removed data reader error handling because it conflicts with SSH errors in the error stream
* Clean up work
* Fix for file line endings
* More clean up
* Change to Linux platform SSH process creation to create process in new session
* Added third party license text for DotNet Core
* Removed process creation in new session and added suppress SIGINT
* Removed unneeded code for creating SSH process
* Fixed Unix compile errors
* Changes for code review
* Response to more code review comments
* Removed unneeded using statements
This improves the performance of the listener by not relying on a new
process starting up to run the listener. It improves the debugability
of tests by providing more direct access to the session executing
the listener. It also reverses the blocking nature of starting the
listener. By default, Start-HttpListener will no longer block, you need
to use -Foreground to have Start-HttpListener block. Lastly, create
a way to catch errors if the listener has a problem. If code in the
listener throws, it emits an error record.
Adds fenced code blocks / output blocks to the `Steps to reproduce`, `Expected behavior` and `Actual behavior` sections, so as to facilitate proper formatting.
Fix#3952.
* Update release documentation to reflect the desired release steps and order.
* Update in-doc links
* Update .spelling
* Address comments
* Additional changes to build/package example
* Update .spelling
* Remove another internal URL
* Name and link updates could be automated
* Move 'Note' to the top of 'Release Steps' section
Remove the code that spins up our own assembly load context. Keep the code that registers our `Resolve` method to the default loader's `Resolving` event, so that we can continue to do special assembly resolution as needed (such as the GAC probing logic needed for consuming FullCLR PS modules).
Essentially, the assembly `Microsoft.PowerShell.CoreCLR.AssemblyLoadContext.dll` is not needed anymore, the remaining code should be moved to S.M.A.dll. However, that will break DSC and other native hosts that are hosting powershell. So this assembly is kept for now.
Fixed tests that were failing or throwing unnecessary information on-screen.
Updated the paths to powershell.exe as per the new artifact layout.
Added Publish-PSTestTools to Compress-TestContent
Added PS Test tools to PSModulePath before starting tests.
NanoServer is missing some console APIs that PSReadline uses which causes PSReadline to not be usable on NanoServer docker images.
For the missing font/display APIs, the fix is to assume all characters use 1 cell which is not always correct for some languages.
For the missing keymap APIs - there is no workaround in this change and a small number of key bindings don't work, there is an open issue to track those.
Fixes#3463
Added try/catch within the enumeration loop to allow the enumeration to continue after encountering an error such as an item within the directory being deleted or renamed.
To assist in testing, two new internal test hooks have been added which cause Get-ChildItem to either delete or rename a specific file (file name hard-coded) when encountered during enumeration.