Commit graph

4986 commits

Author SHA1 Message Date
David Christian e333ac3ab9 Added tests for built-in type accelerators (#4230) 2017-07-14 09:53:28 -07:00
Paul Higinbotham 02737e2fe4 Fixes CIM deserialization bug (#4234) 2017-07-14 09:52:24 -07:00
Ilya dc76c86f7a ValidateSetAttribute enhancement: support set values to be dynamically generated from a custom ValidateSetValueGenerator (#3784)
Currently `ValidateSetAttribute` accepts only explicit constants as valid values. This is a significant limitation. Sometimes we need to get valid values dynamically, ex., Azure VMs, logged-on users and so on. The PR add follow possibilities:
- pass a _custom type_ (a valid values generator) implementing `IValidateSetValuesGenerator` interface to get valid values dynamically.
- pass a _custom type_ (a valid values generator) derived from `CachedValidValuesGeneratorBase` abstract class to get valid values dynamically and _cache_ the list to share with other ValidateSetAttribute attributes.
2017-07-13 21:28:32 -07:00
Travis Plunk 67266f6aa0 Move Bootstrap to 'install' phase for Travis-CI (#4250) 2017-07-13 21:21:32 -07:00
Travis Plunk a10d1c2281 Merge beta.4 release changes (#4247)
* Fix the path on windows containers (#4241)

* Updated string to reflect beta.4 version (#4238)

* Add beta.4 changelog (#4245)

* first pass at beta.4 changelog

* grammar and spelling fixes (#1)

* sort and add new words to dictionary (#4248)
2017-07-13 17:30:58 -07:00
Travis Plunk 6b252868d4 Make travis ci quieter (#4229) 2017-07-11 22:07:31 -07:00
Travis Plunk 278e999a45 add insider release notes (#4228)
* add insider release notes

* note that issue should be fixed in beta 4

* fix spelling error in no known workaround

* fix spelling of pre-release

* Add new words to spelling dictionary for NanoServer-insider release

* fix spelling of PackageManagement
2017-07-11 18:23:14 -07:00
James Truher [MSFT] f200dab0d6 Get Pester fixes into PowerShell (#4227)
There are two fixes in psl-pester:
1. Add Context information to the Pester log which will reduce the name collisions with test names
2. Update test teardown so exceptions thrown in `AfterAll` will not leave pester in a bad state.
When this happens, Pester fails all subsequent tests with the error 'Already in Describe'.
2017-07-11 17:27:52 -07:00
Travis Plunk 7d50e5e5b0 Fix maintainer readme syntax (#4226) 2017-07-11 16:15:11 -07:00
Travis Plunk 1a97af7e04 Fix heading for breaking change contract doc (#4224) 2017-07-11 14:15:34 -07:00
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