Commit graph

5126 commits

Author SHA1 Message Date
Steve Lee db813b6bae add test coverage for -notcontains, -is, -isnot operators (#4179)
* added test coverage for -notcontains, -is, -isnot operators

* cleaned up tests to use -TestCases, added missing -cnotcontains test
2017-07-11 12:27:04 -07:00
Travis Plunk 1278c8948c make sure we don't return null for share module path (#4219)
* make sure we don't return null for share module path
fall back to environment if call to get special path doesn't work

* address PR comments
2017-07-11 11:23:43 -07:00
Oisin Grehan d9828fe937 Add 'semver' as core (contrained-safe) accelerator for S.M.A.SemanticVersion (#4142) 2017-07-11 10:56:28 -07:00
Travis Plunk 7bcbcb3c4c Add nanoserver insider dockerfile (#4212)
* remove empty file

* add nanoserver insider docker image

* remove entrypoint and add cmd

* update docker repo to be an argument

* update docker files for POSIX syntax changes

* add comments
2017-07-10 17:10:21 -07:00
Steve Lee bb0cd656e4 Added section explaining Windows PowerShell vs PowerShell Core (#4186) 2017-07-08 15:20:09 -07:00
jeffbi a9b8e98449 Remove unneeded test hooks and tests due to behavior change in .NET Core (#4200) 2017-07-08 15:18:48 -07:00
Aditya Patwardhan 23c639149d Added code coverage analysis to identify missing coverage (#4097) 2017-07-07 09:48:14 -07:00
Steve Lee 7bce1653f3 Add Windows PowerShell PSModulePath by default on Windows (#4132)
This change is only for Windows and appends the Windows PowerShell PSModulePath on startup via a default profile. Depending on the data/feedback we get, we can decide what to do (opt-in vs opt-out) as we get closer to a release candidate.
2017-07-07 09:43:37 -07:00
Aditya Patwardhan 51c7861da6 Updated Code Coverage badge and filtered out PSReadline module (#4121) 2017-07-07 09:29:23 -07:00
Steve Lee 8f8580a408 Fix usage of -TestCases so that the parameters show up in the test case description (#4188) 2017-07-07 09:25:46 -07:00
Ilya f8ae37c2cb Close eventLogSession and EventLogReader to unlock an etl file (#4034)
Fix #3979
2017-07-06 23:05:41 -07:00
Keith Hill fa02e84d66 Close FileStream opened by Get-FileHash (#4175)
Fix #4174
2017-07-06 22:58:23 -07:00
jeffbi 1688703caf Make Get-ChildItem follow symlinks on demand, with checks for link loops (#4020)
Add the dynamic parameter `-FollowSymlink` to `Get-ChildItem`.
Add a mechanism for tracking visited directories.
Add native code to get device/inode information on Unix/Windows.
Add warning when refusing to enter an already-visited directory.
2017-07-06 12:28:27 -07:00
Tim Curwick d1e05efbf1 Added comma to the list of replaced characters in assemblyname (#4136) 2017-07-06 11:32:54 -07:00
Steve Lee 36eaab2809 Static analysis: Fix usage of XmlReader to ensure XmlResolver is null (#4108)
* the default XmlResolver will attempt to resolve external resources, recommendation is to explicitly set to null which
will raise exception if malicious xml attempts to cause xmlreader to access external resources

* added DTDProcessing and related to XmlReaderSettings
2017-07-06 09:09:57 -07:00
Steve Lee dda482eaac Add markdown lint errors as test failure message (#4189) 2017-07-05 21:47:42 -07:00
zackschuster 8205edabf3 Update .NET CLI information in windows-core.md (#4176) 2017-07-05 16:00:52 -07:00
Bruce Payette ece27ff687 Fix spurious error generated when importing cmdlets from an in-memory assembly (#4117) 2017-06-30 15:36:38 -07:00
Dongbo Wang 3e35fb9918 Move powershell to 2.0.0-preview3-25426-01 using the .NET CLI 2.0.0-preview2-006502 (#4144) 2017-06-30 13:07:14 -07:00
Paul Higinbotham a2922d6ac4 Fix for SSH remoting when SSH client abruptly terminates (#4123)
* Fix for SSH remoting when SSH client abruptly terminates

* Put error message in localizable string resource

* Renamed error string per code review request

* Removed extra error==null check
2017-06-29 11:14:33 -07:00
Ilya a8e3d8968f Refactor MSBuild project files by adding the common property file 'PowerShell.Common.props' (#4106)
`AssemblyVersion` and `FileVersion` are now inferred from the `Version` property, which is inferred by `VersionPrefix`. So now both `AssemblyVersion` and `FileVersion` are 6.0.0.0 for each of PowerShell assemblies, and the `ProductVersion` and `InformationalVersion` are 6.0.0.
2017-06-29 10:25:49 -07:00
Andrew ecefb50d0d Fixing Import-Module on Linux for special cases of NestedModules/RootModule path format (#4010)
* IPMO fix for some cases of NestedModules/RootModule path syntax

* Added tests for #3693 fix

* Updated tests
2017-06-28 16:35:33 -07:00
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