Commit graph

4634 commits

Author SHA1 Message Date
Kirk Munro 244827a4aa Added -Top/-Bottom params to Sort-Object for Top/Bottom N sort and many Pester tests (#2518)
* Added -Top/-Bottom params to Sort-Object for Top/Bottom N sorts; added many Pester tests

* updated changelog

* updated CHANGELOG.md

* replaced Get-Service with Get-Alias in Pester tests

* improved performance for -unique -top/-bottom, changed according to PR feedback

* added newlines to end of two files

* Removed whitespace changes

* Missed 2 whitespace changes to undo in last commit

* Updated to try to resolve merge issue

* change heapify return type, cleaned up test code

* unique top/bottom N sorts are now 2-3 times faster

* code cleanup (removed unused vars, simplified logic)
2016-11-04 14:09:48 -07:00
Hemant Mahawar f315647214 Use the unabbreviated parameter names in Start-PSBootstrap (#2623) 2016-11-04 13:17:30 -07:00
Mike Richmond f23739a3c9 Adding alpha.12 to the list of spelling exclusions (#2603) 2016-11-03 18:17:26 -07:00
Adam Driscoll 28f32cabe6 Adding support for ENABLE_BINDER_DEBUG_LOGGING in CORECLR.
Fix to also print dynamic expressions
2016-11-03 15:06:35 -07:00
Sergei Vorobev a3afeee54e Fix Start-PSBootstrap install_name_tool call on macOS (#2601) 2016-11-03 14:30:11 -07:00
Florian Feldhaus 9ccd778ed6 Enable WebRequestPSCmdlet to not validate HTTPS certificates (#2006)
* Enable WebRequestPSCmdlet to not validate HTTPS certificates

Added switch parameter IgnoreCertificateCheck to WebRequestPSCmdlet to enable Invoke-WebRequest and Invoke-RestMethod to not validate the HTTPS certificate of the server if required.

* Changed IgnoreCertificateCheck parameter name to NoCertificateCheck

Changed the switch parameter IgnoreCertificateCheck to NoCertificateCheck for WebRequestPSCmdlet to enable Invoke-WebRequest and Invoke-RestMethod.

* Changed NoCertificateCheck parameter name to SkipCertificateCheck

Changed the switch parameter NoCertificateCheck to SkipCertificateCheck for WebRequestPSCmdlet to enable Invoke-WebRequest and Invoke-RestMethod.

* Added test for SkipCertificateCheck parameter

Validation of SkipCertificateCheck parameter in Invoke-WebRequest and Invoke-RestMethod. First validating, that exception is thrown for HTTPS URI with expired certificate. Then validating, that no exception is thrown if SkipCertificateCheck parameter is used. HEAD method must be used for Invoke-RestMethod to not return any body. Invoke-RestMethod can't parse the HTML returned when using GET method.

* Updated test for SkipCertificateCheck parameter to use ExecuteWebCommand function
2016-11-03 14:29:17 -07:00
Mike Richmond ea6cacafd7 Change log and 6.0.0-alpha.12 version number updates (#2593) 2016-11-03 14:23:05 -07:00
Jason Shirk c8c55b7ce7 Fix NullReferenceException in binder (#2591)
There was a NullReferenceException after turning on constrained language mode
if creating a binding on a thread with no runspace.

The fix is to assume if there is no runspace that we are not in constrained language
mode, and also generate a binding restriction that assumes the same.
2016-11-03 14:15:58 -07:00
Sergei Vorobev 46ff660271 Fix crypto libs patching logic to accomodate multiply files (#2541)
Native library also changed from System.Security.Cryptography.Native.dylib
to System.Security.Cryptography.Native.OpenSsl.dylib

See discussion in #2510
2016-11-02 14:25:46 -07:00
nitinbps f4c1569421 Get-ChildItem -Recurse -ErrorAction Ignore doesn't ignore the errors (#2503)
Get-ChildItem -Recurse -ErrorAction Ignore doesn't ignore the errors for some specific files under a folder and instead terminate the pipeline.
2016-11-02 11:26:51 -07:00
Steve Lee f102fce1dd Update KNOWNISSUES.md (#2586)
Update Remoting and JEA/Linux based on current status
2016-11-01 22:47:19 -07:00
Charu Bassi 85825e2b0b Fix Resolve-Path -LiteralPath for drive paths (#2572)
Resolving #2570.
Ignore drive paths in the check. If the input is a drive path,
then "\" is passed as the path to GetDriveQualifiedPath with drive info.
Since, the path here starts with "\", treatAsRelative is set to false
which prevents further formatting of this path.
The check is only valid for PSDrives with root path equals to UNC paths or the paths
in unix.
2016-11-01 18:01:52 -07:00
Jason Shirk b7c04df47b Update NativeCommandProcessor.Tests.ps1
Fix logic error in skipping
2016-11-01 14:15:31 -07:00
Jason Shirk (POWERSHELL) 9b20875d6f Test that pipeline isn't blocked when running windows exes 2016-11-01 14:15:31 -07:00
Jason Shirk (POWERSHELL) f65312dbc0 Don't block pipeline when running windows exes 2016-11-01 14:15:31 -07:00
Paul Higinbotham 24f3b75549 Fix for PowerShell SSH remoting with recent Win32-OpenSSH change. (#2538)
* Fix for Win32-OpenSSH break when hosting PowerShell in server mode as an SSH subsystem.

* Refactored to use null PSHostUserInterface implementation

* Implemented code review comments
2016-11-01 13:02:31 -07:00
Steve Lee 1851e1a5dc fixed test on Windows, also should have been pending due to another bug (#2580) 2016-11-01 10:53:19 -07:00
iSazonov 5aee4ba85e Fix Select-Object to approve UX and fix return a property named * (#2421)
There are mainly 2 changes:
1. When '-ExcludeProperty' is specified but '-Property' is not, use "*" as the default value for '-Property'.
2. Allow 'Select-Object -Property noexist-name' to return a PSObject with property noexist-name, unless noexist-name itself contains wildcards.
2016-11-01 10:04:44 -07:00
Andy Li a2384bc7d8 add some info about spellchecker to CONTRIBUTING.md 2016-10-31 18:02:26 -07:00
Andy Li 0f6d8bf077 move markdown-spellcheck installation to the install section 2016-10-31 18:02:26 -07:00
Andy Li 7147b82e9b add newline as requested 2016-10-31 18:02:26 -07:00
Andy Li 71909861ee Ignore spelling errors in src/Modules/Shared/Pester.
Because it is an external lib.
2016-10-31 18:02:26 -07:00
Andy Li 44f7951313 automatic spellchecking .md files in TravisCI (#838) 2016-10-31 18:02:26 -07:00
Sergei Vorobev 2f233644f2 Pin dotnet-cli version to 1.0.0-preview3-003930 (#2573) 2016-10-31 17:55:29 -07:00
iSazonov cef0c54157 Fix Get-Alias Name parameter allows Null value (#2545)
1. Add [ValidateNotNullOrEmpty()] to Name parameter
2. Add tests
2016-10-31 17:19:25 -07:00
Mike Richmond 9b478dd531 Fixing the Win10 sdk presence check (#2568) 2016-10-31 15:02:44 -07:00
Steve Lee 44eb20dc8f Fixes #2534 by replacing expensive WMI query with Win32 API calls (#2535)
* Fixes #2534 by replacing expensive WMI query with Win32 API calls

* fix break on unix build

* added tests for #2535

* although test passed, fixing exception that shows up

* fixed Describe text

* addressing code review feedback

* addressing review feedback to comment on why sleep is needed
added check that test processes are created before we try to kill them

* fixed test to timeout and pending fix for #2561
2016-10-31 09:41:13 -07:00
Dongbo Wang 0e8c809ffb Replace 'git rev-parse' with path relative to '$PSScriptRoot' in powershell tests 2016-10-28 16:51:44 -07:00
Dongbo Wang e09ddc494c Further update the tests and product code to fix test failures 2016-10-28 16:51:44 -07:00
Dongbo Wang 4bb0b13e09 Refactor implicit remoting tests to work in CI 2016-10-28 16:51:44 -07:00
PowerShell Team c975b9f6a0 Move implicit remoting tests from source depot to GitHub 2016-10-28 16:51:44 -07:00
Dongbo Wang 53d0345911 Enable implicit remoting cmdlets in PowerShell Core 2016-10-28 16:51:44 -07:00
Charu Bassi ee2feaa827 Fix set-content failure for creating file in psdrive. (#2392)
Resolving #2206

Set-Content fails to create a file for PSDrive path, if the path root
begins with defaultPathSeperatorString (ex: UNC path and paths in Single
rooted filesystems like Unix)
2016-10-28 14:31:02 -07:00
Hemant Mahawar 67638548fc Add ValidateNullOrEmpty to -Name parameter of Get-Service (#2542)
* Adding validation to Get-Service -Name parameter
2016-10-27 16:37:50 -07:00
iSazonov baeec066d9 Add support <Suppress> in Get-WinEvent -FilterHashtable (#2506)
* Add support <Suppress> in Get-WinEvent -FilterHashtable

1. Add support <Suppress>
2. Refacrtoring BuildStructuredQueryFromHashTable() to use StringBuilder
3. Add tests

* Changelog
2016-10-27 14:54:14 -07:00
Sergei Vorobev 5c6a11213b Wrap calls to choco install in Start-NativeExecution (#2547) 2016-10-27 13:06:17 -07:00
Mike Richmond a659a95a00 Fixing the plugin install directory to refect the current version (#2539) 2016-10-26 15:25:09 -07:00
Mike Richmond 025a3a6d9b Adding details for the Windows release instructions (#2536) 2016-10-25 14:12:33 -07:00
Sergei Vorobev 39d89ee15f Fix download links for msi (#2523)
#2522
2016-10-24 16:55:12 -07:00
Dongbo Wang 9ec8baea79 Add '<Link>' tag to '<Compile>', '<None>' and '<EmbeddedResource>' tags to make those items look similar as when the *.csproj files were in the original project folders. (#2519) 2016-10-21 17:04:05 -07:00
Dongbo Wang 9818988e33 Update the .csproj files to point to the correct items (e.g. *.cs and *.resx) 2016-10-21 14:12:10 -07:00
Dongbo Wang 54cb65bbf2 Move *.csproj files to PowerShell/src/vs-csproj and PowerShell/test/vs-csproj to avoid confusing the latest dotnet.exe.
If a *.csproj file is in a project directory, the latest dotnet.exe will use it, instead of the project.json file, to build the project.
2016-10-21 14:12:10 -07:00
Mike Richmond 35ab4293e3 Adding Windows path to the VS Code Debugging setup document. (#2512) 2016-10-20 14:02:45 -07:00
PowerShell Team ed38d70cf6 Adding Ported Get-ComputerInfo Tests 2016-10-19 14:59:38 -07:00
Mike Richmond 3bbeabf6bc Adding WindowsVersion to Get-ComputerInfo 2016-10-19 14:59:38 -07:00
Chunqing Chen 0908547083 Remove the unnecessary use of lock in PseudoParameterBinder to avoid deadlock (#2501)
This is the fix to MSFT:9039127 [RFC] : SMA Jobs stop processing, show various status but never change or progress; due to deadlock in sandbox process.
The fix is brought to GitHub to make sure GitHub powershell always has the latest changes.
2016-10-18 17:32:56 -07:00
Dongbo Wang 1d29d42ff7 Remove crossgen'ed IL assemblies and then rename NI assemblies to the same as the corresponding IL images. (#2484)
* Remove crossgen'ed IL assemblies and then rename NI assemblies to the same as the corresponding IL images.
This is to make sure:
  1. The dependency existence check by powershell.exe will pass for all TPAs.
  2. CoreCLR by default will load the NI images even though it's using names of the IL images.

* Update the comment to make it easy to understand
2016-10-18 13:12:51 -07:00
Dongbo Wang 289e6958ef Update docs/scripts to use the alpha.11 release packages (#2498) 2016-10-18 13:09:09 -07:00
Dongbo Wang d26b1d7155 Update coding-guidelines to encourage adding code comments (#2489) 2016-10-18 10:12:20 -07:00
Andrew Schwartzmeyer 5e1661df59 Document Start-ResGen and Start-TypeGen (#2487) 2016-10-17 15:21:57 -07:00