Commit graph

5154 commits

Author SHA1 Message Date
Steve Lee 40c479d071 Address static analysis issues in SSH remoting (#4083)
* address static analysis issues
- remoteRunspaces is not used TFS:10618323
- not checking return value of ResumeThread() TFS:10618344

* fixed magic number use

* changed magic number to Uint.MaxValue
2017-06-28 16:27:54 -07:00
Wojciech Sciesinski b25b8df7ca Fix the link to .Net Core Foundation (#4127) 2017-06-28 10:43:16 -07:00
Steve Lee 3fbaf41c1a add CODE_OF_CONDUCT.md (#4109)
* add CODE_OF_CONDUCT.md

* updated spelling for CODE_OF_CONDUCT.md

* Fixed markdown lint error

* added link to CODE_OF_CONDUCT.md as expected by GitHub
2017-06-28 10:34:09 -07:00
Steve Lee 042a6f2534 Need explicit -command to execute command in Read-Host output test (#4103) 2017-06-28 10:13:37 -07:00
Jason Shirk ff5609785b Minimize writing ANSI escape sequences in PSReadline (#4110)
Instead of changing Console.*groundColor on every character, only set
the color when the color changes - this avoids writing out ANSI escape
sequences after every character.

Fixes #4075
2017-06-27 23:22:16 -07:00
Keith Hill 27e47f9ee1 Implement Unicode escape parsing (#3958)
* Implement Unicode variable width `u{xxxxxx} escape sequences.
2017-06-27 22:55:57 -07:00
Paul Higinbotham 2ee9705751 Add missing timestamper cert to the newer catalog signing APIs for Get-AuthenticodeSignature (#4061)
* Fixed missing functionality to add timestamper cert for the newer catalog signing APIs for Get-AuthenticodeSignature
2017-06-27 14:59:52 -07:00
Andrew e2e07b1830 Change New-ModuleManifest encoding to UTF8NoBOM on non-Windows platforms (#3940)
* Change New-ModuleManifest encoding to UTF8NoBOM

* Addressed PR feedback

* Fixed test for Travis CI

* Updated tests
2017-06-27 12:48:25 -07:00
Ilya 9e41c647a9 Enhance ResGen tool to support generating C# binding file for a specific .resx file (#3918) 2017-06-26 10:48:24 -07:00
mrpnkt 83b18570ea Run PowerShell in latest Kali (#4035)
* Run PowerShell in latest Kali

* markdown error in pull request

* Update linux.md

* code block fix

* fixed typo

* fixed typos
2017-06-25 12:15:06 -07:00
Maria Romero 471f4e8a48 Add tab completion for Export-Counter -FileFormat parameter (#3856)
* add tab completion for -FileFormat parameter

* update expected error for invalid -FileFormat test case
2017-06-25 12:13:57 -07:00
Mike Richmond a291834f39 Revert "Set assembly versions by MSBuild" (#4091) 2017-06-23 10:17:25 -07:00
Dongbo Wang b7a7e9980c Update the release steps (#4082) 2017-06-23 09:36:43 -07:00
Ilya 84d458bb4c Add description of recommended settings for VS Code (#4054) 2017-06-23 09:23:50 -07:00
jeffbi 5ee4ec1e1e Make Move-Item work with its -Include, -Exclude, and -Filter parameters (#3878)
* Make Move-Item work with its -Include, -Exclude, and -Filter parameters (#2385)

Invoke the correct overload of SessionState.Path.GetResolvedPSPathFromPSPath, passing the cmdlet context object.

* Update tests per code review.

* Changes per code review.

* Remove stray comment
2017-06-22 19:14:51 -07:00
Ilya c549925f67 Set assembly versions by MSBuild (#3917)
* Update assemblies versions by MSBuild and create a new PowerShellAssembly.props file to consolidate properties.

* Move import on first place

* Move to "6.0.0-beta.3"
2017-06-22 18:21:36 -07:00
Dongbo Wang 07db8c827b Update docs and scripts for v6.0.0-beta.3 release 2017-06-22 13:55:47 -07:00
Ilya aa97fe7cd1 Resx - remove trailing white spaces and extra Newline at EOF (#4047) 2017-06-22 13:45:11 -07:00
Aditya Patwardhan 7491417bf9 Fixed BaseDirectory tests by adding -c instead of positional argument (#4078) 2017-06-22 13:35:04 -07:00
Staffan Gustafsson b65bc62934 Add type inference for Foreach-Object -MemberName (#3972)
This PR adds type inference support for the 'MemberName' parameterset for Foreach-Object.

Both of the following should work:

```
    Get-Process | % {$_.MainModule} | % Com<Tab>
    Get-Process | % MainModule | % Com<Tab>
```

Before this change, only the first line worked, this PR addresses the second line.

Fixes #2596
2017-06-22 13:34:33 -07:00
Aditya Patwardhan c7b959bd6e Make CodeCoverage tests work with CodeCov.io and related fixes (#4050)
* Fixed OpenCover module and CodeCoverage launcher script

* Changes to layout of package caused some changes to package path.
* Added Test modules from tests\tools\modules
* Fixed Get-ChildItem test
* Added convertor for converting OpenCover output file to JSON.
* Updated how the file is uploaded to CodeCov.io

* Addressed code review comments
2017-06-21 19:20:10 -07:00
Dongbo Wang 3b6c87d873 Update host-powershell doc for beta.3 release (#4071) 2017-06-21 18:53:39 -07:00
Steve Lee 18cddc99eb with change of positional parameter to powershell.exe from -command to -file, need to update some feature tests (#4058) 2017-06-21 18:47:56 -07:00
Dongbo Wang da8dd28942 Refactor CompletionCompleters.cs to avoid constructing unnecessary CompletionContext instances (#4048) 2017-06-21 11:43:06 -07:00
Ilya 20862d6204 Check the dotnet-cli version in Start-PSBuild (#4045) 2017-06-21 09:32:06 -07:00
Dongbo Wang 2e8ad72ca2 Update CHANGELOG.md (#4059) 2017-06-20 16:45:49 -07:00
Ilya 598cebf7b2 Add cache for GetApplicationBase (#3969) 2017-06-20 15:08:02 -07:00
Dongbo Wang 05dffcd1aa Update release version 2017-06-20 14:14:38 -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