Commit Graph

4928 Commits

Author SHA1 Message Date
Ilya
20862d6204 Check the dotnet-cli version in Start-PSBuild (#4045) 2017-06-21 09:32:06 -07:00
Ilya
598cebf7b2 Add cache for GetApplicationBase (#3969) 2017-06-20 15:08:02 -07:00
Travis Plunk
5a84e60c13 Remove nightly docker images (#4052) 2017-06-20 10:42:26 -07:00
Steve Lee
3543498ee3 Adding a slightly bigger window to 'Start-Sleep' test. (#4049) 2017-06-20 09:49:49 -07:00
jeffbi
06dfe41e7d Enable Send-MailMessage on CoreCLR (#3869)
* Enable Send-MailMessage for PowerShell Core
* Update cmdlet entry in DefaultCommands.Tests.ps1
* Changes per code review:
  * Add check for SMTP server
  * Send mail to/from currently logged-in user on currently-named machine
  * Do not try to clear/create the mailbox before the test
  * Add validation of Subject
2017-06-19 18:19:25 -07:00
Ilya
f30b06fe7c Add 'CSharpVersion7' member into public 'Language' enum (#3933)
Public enum 'LanguageVersion' from 'Microsoft.CodeAnalysis.CSharp'
already contains 'CSharp7' member.
After moving PowerShell to .Net Core 2.0 we should add 'CSharpVersion7'
member into public 'Microsoft.PowerShell.Commands.Language' enum too.

This will allow 'Add-Type -Language CSharpVersion7'
2017-06-19 18:09:15 -07:00
Steve Lee
a66cd0b620 Remove ClrVersion property from $PSVersionTable (#4027)
* ClrVersion property of $PSVersionTable is not useful with CoreCLR and end users should not be using it
that value to determine compatibility.  Recommendation from dotnet team is to remove that property.

* Removed internal members used for CLRVersion

* removed CLRVersion from FullCLR build as well

* added additional information to run `start-psbootstrap -buildnative` if cmake is not found
2017-06-19 15:10:36 -07:00
Steve Lee
41f65de57c Change positional parameter for powershell.exe from -Command to -File (#4019)
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.
2017-06-19 12:17:56 -07:00
Tadas Medisauskas
437d773597 Start-Sleep: add 'ms' alias to '-Milliseconds' (#4039) 2017-06-19 12:15:31 -07:00
Travis Plunk
a8f9826f08 Remove unused P/Invoke method declarations (#4041) 2017-06-19 12:10:30 -07:00
Aditya Patwardhan
2ae5d071ce Fix about_* topic help issues and a few tab completion regressions (#4014) 2017-06-18 18:27:34 -07:00
Dongbo Wang
b4973fc920 Move PowerShell back to .NET Core 2.0.0-preview1-002106-00 (#4026) 2017-06-15 16:29:25 -07:00
Dan Travison
039ed6764d Strip authorization header on redirects with web cmdlets (#3885)
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
2017-06-15 15:52:08 -07:00
Aditya Patwardhan
26a44abcec Added logic in AssemblyLoadContext to load assembly from GAC. (#3981) 2017-06-15 13:25:59 -07:00
Dongbo Wang
440590ef8a Add a test for chaining more than 2 native commands in pipeline (#4012) 2017-06-14 16:50:18 -07:00
Paul Higinbotham
578f9e5e8b Fix Linux platform SSH process creation for remoting (#3901)
* 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
2017-06-14 15:56:56 -07:00
Dongbo Wang
f4e25b7eef Update README.md about the 'v1.11.0-beta4' VSCode C# extension (#4009) 2017-06-14 13:34:26 -07:00
Dongbo Wang
8731747c3e Move to latest .NET Core and enable -SkipCertificateCheck on OSX (#3887) 2017-06-13 17:58:20 -07:00
Steve Lee
ea0082ab8d Consolidated the two test exes into one (#3982)
Combined the previous echoargs and createchildprocess test exes into a single TestExe that can be extended for other tests.
2017-06-13 17:49:56 -07:00
Chunqing Chen
65f96e0298 Fix the issue that PS only stops transcription when all runspaces are closed (#3896)
Only stop transcription when all runspaces are closed
2017-06-13 15:44:06 -07:00
Dongbo Wang
6bb12c9df5 Update native code to not call into PSAssemblyLoadContext (#3973) 2017-06-12 17:44:13 -07:00
Chunqing Chen
b4b4e60670 Use wildcard matching in help file search (#3971) 2017-06-12 14:48:30 -07:00
Steve Lee
bebf487d10 fixed link to download C++ Redist (#3983) 2017-06-12 14:33:35 -07:00
Steve Lee
af0600ded2 Fix non-fatal (red) errors in test output (#3968) 2017-06-09 16:29:59 -07:00
James Truher [MSFT]
759aff1cf1 Make ConsoleHost honor NoEcho on Unix platforms (#3801) 2017-06-09 14:57:53 -07:00
Steve Campbell
1cb2e8a1d5 Add installation instructions for Kali Linux (#3634)
* Update README.md

* Update linux.md

* Update linux.md

* fix markdownlint on README
2017-06-09 13:15:12 -07:00
James Truher [MSFT]
bc807322ed Alter test httplistener to use a new runspace rather than a job (#3966)
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.
2017-06-09 10:12:46 -07:00
Dongbo Wang
7a51b446e5 Support creating PS class instance that is not bound to any runspace (#3871) 2017-06-07 18:00:03 -07:00
jeffbi
ce4c35b9ed Allow use of long paths (#3960)
When calling Windows native API to determine if an item exists,
ensure the path is prepended with "\\?\" when the path is a long path.

Fixes #3891
2017-06-07 17:13:51 -07:00
Staffan Gustafsson
3125764476 Fix bug where native.exe --<tab> would not call native completer (#3633) 2017-06-07 16:34:44 -07:00
SRGOM
00e3fc3a99 Update README.md (#3873)
Added link to "awesome-powershell"
2017-06-07 16:25:32 -07:00
Ilya
0052ebb49a Add version to PowerShell banner (#3916)
Fixes #3895
2017-06-07 15:59:46 -07:00
Staffan Gustafsson
a52adcd3cf Adding support for Typeinference based on runtime variable values (#2744)
* Refactored the type inference code in preparation to make it a public api.
* Added type inference tests

Fixes #2567
2017-06-07 15:52:33 -07:00
Joey Aiello
a164609eea Add documentation requirements to CONTRIBUTING.md (#3794) 2017-06-07 10:05:39 -07:00
Michael Klement
3133f85443 Update ISSUE_TEMPLATE.md (#3953)
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.
2017-06-07 06:59:27 -07:00
Ilya
f04d2fd2bc Convert tab indentations to spaces in *.resx files (#3576)
* Convert tab indentations to spaces in *.resx files

* Add Newline at EOF

* Remove extra char
2017-06-06 18:18:59 -07:00
Chunqing Chen
751dadab08 Fix the issue Get-Help does not support string pattern under Unix (#3852) 2017-06-06 18:06:51 -07:00
Dongbo Wang
7681fe9585 Update the releasing documentation to reflect the desired release steps and order (#3938)
* 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
2017-06-06 17:59:40 -07:00
Steve Lee
9eed401427 Add code cleanup and documentation labels to issue-management.md (#3908)
* Update issue-management.md to add `code cleanup` and `documentation needed` labels

* changed label to `Documentation Needed` based on feedback
2017-06-06 08:56:26 -07:00
Dongbo Wang
8ae6c5bb3b Refactor PowerShell Core to use the default CoreCLR loader instead (#3903)
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.
2017-06-05 20:59:30 -07:00
Aditya Patwardhan
73548532bc Fixed code coverage infrastructure and some failing tests (#3914)
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.
2017-06-05 17:37:48 -07:00
Andrew
28ec9a3511 Fix Import-Module to honor 'ScriptsToProcess' when '-Version' is specified (#3897) 2017-06-05 14:19:03 -07:00
Sergei Vorobev
924f281c96 Fix Start-PSBuild -SMAOnly with the latest dotnet cli (#3930) 2017-06-05 14:10:42 -07:00
Travis Plunk
fc75c16a30 Set default parameter set for Start-PSPackge (#3939) 2017-06-05 13:39:15 -07:00
Steve Lee
22a3a896ee Silently ignore failure on GetConsoleFontInfoEx() api call (#3937)
The api is available on ServerCore but fails (returns false) running in container.
Silently ignoring the failure allows PSReadline to work.
2017-06-05 13:17:26 -07:00
Dongbo Wang
299a8abb56 Make 'Start-PSBuild' and 'Start-PSPackage' accept a release tag argument (#3921) 2017-06-05 10:21:28 -07:00
Keith Hill
ef33c30219 Update launch.json Attach config to use process picker. (#3928) 2017-06-03 10:59:30 -07:00
Dongbo Wang
a543161d42 Update docs for beta.2 release (#3922) 2017-06-02 14:17:27 -07:00
Ilya
9c42d2d030 Remove BuildVersion from $PSVersionTable (#3877)
* Remove BuildVersion from PSVersionInfo type

* Fix error messages

* Remove BuildVersion from tests
2017-06-01 15:56:28 -07:00
Dongbo Wang
820e96d062 Update CHANGELOG.md for beta.2 release (#3907) 2017-06-01 12:29:09 -07:00