Commit Graph

4904 Commits

Author SHA1 Message Date
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
Francisco Gamino
e1599b59ac Update regular expression to filter out Json contents that do not start with an array for ConvertFrom-Json. (#3882) 2017-06-01 11:15:17 -07:00
Steve Lee
00a11d9201 On Mac, when the httplistener is stopped, it takes time for the system to clean it up. It also appears that on Mac, http reservation (#3872)
Use different HttpListener for Invoke-WebRequest and Invoke-RestMethod tests
2017-05-31 15:56:32 -07:00
Steve Lee
ee45650660 Enable PSReadline to work on NanoServer (#3815)
NanoServer is missing some console APIs that PSReadline uses which causes PSReadline to not be usable on NanoServer docker images.

For the missing font/display APIs, the fix is to assume all characters use 1 cell which is not always correct for some languages.

For the missing keymap APIs - there is no workaround in this change and a small number of key bindings don't work, there is an open issue to track those.

Fixes #3463
2017-05-31 10:26:41 -07:00
James Truher [MSFT]
51d4a45e3c Change package name 'el7.centos' to 'el7' (#3732) 2017-05-30 15:25:07 -07:00
Steve Lee
bf59075a0c Fix daily test failure in set-content test (#3884) 2017-05-30 14:20:18 -07:00
Dongbo Wang
e75cff662a Make PSReadline render correct portion of prompt on Unix when it's a multi-line string (#3867)
Check whether the prompt is multi-line or not. If it is, then only use the part that is shown in the input line.
2017-05-25 17:26:39 -07:00
jeffbi
c29bd7d684 Make Get-ChildItem continue enumeration when encountering error on contained item (#3806)
Added try/catch within the enumeration loop to allow the enumeration to continue after encountering an error such as an item within the directory being deleted or renamed.

To assist in testing, two new internal test hooks have been added which cause Get-ChildItem to either delete or rename a specific file (file name hard-coded) when encountered during enumeration.
2017-05-25 17:24:47 -07:00
Francisco Gamino
7aa7f3858c Make ConvertFrom-Json deserialize an array of objects with multiple lines. (#3823)
* Fixing ConvertFrom-Json on CoreCLR to be able to handle a collection of strings which represent a JSON content.

* Adding test case for ConvertFrom-Json to process an array of PSObjects as a single string.
2017-05-25 13:00:51 -07:00
Steve Lee
40446c80a7 Support Link Header pagination in WebCmdlets (#3828)
* Support Link Header pagination in WebCmdlets to make it easier for the end user implementing:
https://github.com/PowerShell/PowerShell-RFC/blob/master/2-Draft-Accepted/RFC0021-Link-header-based-pagination-for-WebCmdlets.md

When the response includes a Link Header (https://tools.ietf.org/html/rfc5988#page-6), for Invoke-WebRequest we
create a RelationLink property that is a Dictionary representing the URLs and rel attributes and ensure the
URLs are absolute to make it easier for the developer to use.  For Invoke-RestMethod, we expose a -FollowRelLink
switch to automatically follow 'next' rel links to the end until we hit the optional -MaxRelLink parameter value.

* removed unnecessary refs to namespaces

* addressed code review feedback
2017-05-24 15:54:02 -07:00
Dongbo Wang
99f9ef22d2 Fix "Invoke-Item" to accept a file path with spaces on Unix platforms (#3850)
Use the method NativeCommandParameterBinder.NeedQuotes, which is used by powershell native command processor, to check if quotes are needed. If yes, add quotes in the same way as our native command processor.
Also, make 'Invoke-Item' on Linux and OSX able to invoke an executable properly.
2017-05-24 13:30:54 -07:00
Travis Plunk
684e06eb11 Make DocumentEncryptionCert test pending (#3854) 2017-05-24 12:22:17 -07:00
Ilya
a02d129cc4 Change to not expose unsupported aliases/cmdlets in Unix (#3595)
Make changes to not expose the aliases "gin", "gsv", "sasv" and "spsv" in Unix platforms.
Also refactored aliases related tests and added new tests covering the complete list of built-in aliases/cmdlets.
2017-05-23 10:27:31 -07:00
Travis Plunk
3496136999 Remove undocumented certificate Win32 APIs (#3818)
The code paths deleted where using the undocumented Win32 APIs on WIn8 and newer for the following purposes:
* Faster filtering
* Getting two properties (left empty on Win7 and below)
* Logging using Certificate components when a cert is deleted or copied.

After the change, all the code uses public APIs.  Filtering is done in PowerShell using existing code.  I don't believe the logging is needed.
2017-05-22 22:33:51 -07:00
Aditya Patwardhan
7517004052 Fix check for Wix toolset in New-MSIPackage (#3843)
Wix toolset is part of the AppVeyor base image. The daily build did not generate a MSI since Wix toolset was not found.
AppVeyor updated the Wix version in the base image and our checks failed.
The fix removes the hardcoded version from path. It also guards against multiple side-by-side versions.
2017-05-22 22:28:31 -07:00
Aditya Patwardhan
73dd94197b Removed automatically adding year to copyright message (#3804)
Removed automatically adding year to copyright message for file generated by New-ModuleManifest and New-PSRoleCapabilityFile.
2017-05-21 21:19:10 -07:00
Joey Aiello
0862d1c5c9 Adding Server 2008 R2 to README.md (#3824) 2017-05-19 11:31:41 -07:00
Aditya Patwardhan
f20178275a Removed 'Import-Module $helperModule' as it is not needed. (#3814) 2017-05-19 10:42:20 -07:00
Bruce Payette
dfb3866c5d Support backgrounding pipelines with ampersand (#3360)
Implements support for backgrounding pipelines with &. Putting & at the end of a pipeline will cause the pipeline
to be run as a PowerShell job. When a pipeline is backgrounded a job object is returned. Once the pipeline is
running as a job, all of the normal job cmdlets can be used to manage the job. Variables (ignoring process-specific
variables) used in the pipeline are automatically copied to the job so
    copy $foo $bar &
just works. The job is also run in the current directory instead of the user's home directory as is the case with Start-Job.Implement
2017-05-18 19:15:19 -07:00
Steve Lee
f0b03bc57d Test HttpListener so that PowerShell Core tests don't have to rely on an internet web service (#3778) 2017-05-18 15:02:19 -07:00
Aditya Patwardhan
779d563d7d Removed unused help providers and related classes. (#3795)
* Removed unused help providers and related classes.

We do not publish any help content for FAQ, General and Glossary help providers. These were only used in v1 of Powershell.

* Removed XSDs for obsolete help providers

* Removed references from other XSDs.
2017-05-17 17:27:48 -07:00
Ilya
e00161a8af Add autoload for TestLanguage.psm1 TestHelpers.psm1 (#3456)
* Add autoload for TestHelpers.psm1

Test.Helpers.psm1 was renamed to TestHelpers.psm1

* Resolve conflit and rebase Add autoload for TestLanguage.psm1

* Remove unneeded comments from PSD1 files

* Rename test modules

Remove approved verbs (Get-Verb) from module names.

* Enhance ShouldBeErrorId to output exception into pipeline for later analysis

* Remove unneeded comments

* Resolve merge conflict
2017-05-17 11:09:27 -07:00
James Truher [MSFT]
599eae9b1b Do not send telemetry in CI (#3785)
This removes the telemetry semaphore file in CI for both Travis-CI and AppVeyor
2017-05-17 11:08:38 -07:00
Michael Klement
30b97a5d7c Fix for #3786 (#3793)
The appropriate [SemanticVersion] constructor now accepts a [version] instance that has only major and minor components specified, in which case the patch component now defaults to 0.
2017-05-16 17:10:03 -07:00
Steve Lee
96506f4cc1 Cross-gen the top assemblies with JIT times > 5ms (#3787)
Startup went from 1998 ms to 1067 ms.
Size went from 103 MB to 133 MB.
2017-05-15 23:34:32 -07:00