Commit graph

4819 commits

Author SHA1 Message Date
Adam Bertram
e07e1b596d Fixed PowerShell extension broken link (#2874) 2016-12-12 10:17:43 -08:00
Sergei Vorobev
cb378be1c8 Create Start-PSRelease helper function (#2753) 2016-12-12 09:34:17 -08:00
Dongbo Wang
bbf1766ac7 Fix try/catch to choose the more specific exception handler (#2429)
* Refactor 'FindMatchingHandler' to get rid of recursion
Search state can be saved and used throughout the searching process without the recursion.

* Rank the exception types based on how specific they are

* Refactor code to find handler based on the rank of given handlers
2016-12-09 12:37:08 -08:00
Dongbo Wang
c982f30d4e Fix powershell class to use the current EngineSessionState for execution. (#2837)
When a PS class is defined in a module and the module gets reloaded, the class would still use the SessionState from the old module for execution, and thus it doesn't reflect changes to the module state during the reload. This fix is to make sure we always use the current EngineSessionState for PS class execution.
2016-12-09 11:06:07 -08:00
Robin Munn
38977a27ea Fix Unicode in license_thirdparty_proprietary.txt (#2857)
This file contained many occurrences of U+F0A7, a character from the
designated Private Use Area, so its meaning is not defined and fonts
can assign any symbol to that character. Since the person who originally
wrote this file works at Microsoft, it seems reasonable to assume that
he was using the Wingdings font, which has a bullet character at U+F0A7.
Thus, replacing these characters with the proper Unicode bullet (U+2022)
seems the right way to fix this.
2016-12-08 14:58:23 -08:00
Dave Wyatt
177c99de93 Adding ValidateNotNullOrEmpty attribute to parameters listed in #2672 (#2685) 2016-12-08 10:28:55 -08:00
Aditya Patwardhan
49d5b6ab4f Fix OpenCover.console.exe parameter ordering issue. (#2854)
* Fix OpenCover.console.exe parameter ordering issue.

The targetargs parameter needs to be at the end, otherwise everything
after that is considered as part of targetargs.

* Addressed code review comments

* Removed unnecessary file
2016-12-08 09:47:03 -08:00
Naadir Jeewa
32a8601f92 Rebase onto .NET Core 1.1 (#2737)
* Rebase onto .NET Core 1.1

Modify `Build.psm1` and `project.json` files to use .NET Core 1.1.

.NET Core 1.1 ships with an older dotnet/cli than has currently been used,
so we revert to use case-sensitive directory names for dependencies.

.NET Core 1.1 is a pre-requisite for supporting Fedora 24.

* PSReadLine: Bump major version of PSReadline to 6.0.0-*

* Microsoft.PowerShell.Commands.Utility: Bump major version of Microsoft.CodeAnalysis.Csharp

* Microsoft.PowerShell.SDK: Revert attempt to import netcoreapp1.1 instead of dnxcore

* build.psm1: Restore ability to specify version of dotnet-install.sh
2016-12-07 18:29:21 -08:00
Kitt Holland
e568fda5c3 Rewrite New-TemporaryFile in C# (#2786)
Literal translation of New-TemporaryFile function to a C# cmdlet,
other than moving logic from Begin to End.
2016-12-06 16:22:07 -08:00
James Truher [MSFT]
9aa693dfb3 Jameswtruher/travisdaily2 (#2842)
* Assign $ProgressPreference = "SilentlyContinue" to reduce output size

Travis is still complaining that the log file is too big, eliminating progress is
another step to reducing output. It's also not needed for our CI environment.

* Removed white space at end of lines

* fix misplacement of progress preference setting

also fix up trailing whitespace
2016-12-06 13:58:57 -08:00
Dongbo Wang
2fe10558a2 Add basic test to make sure 'New-PSSession' doesn't crash powershell 2016-12-06 11:33:07 -08:00
Dongbo Wang
ecfab1d550 Depend on the NuGet package 'libpsrpclient' to enable client-side PSRP on Linux and OSX 2016-12-06 11:33:07 -08:00
David Christian
9c9b56d22f Updated Split-Path to work with UNC Roots (#2788) 2016-12-04 15:00:32 -08:00
Aditya Patwardhan
9a195f44c1 Marked flaky test as pending to unblock daily builds (#2838) 2016-12-04 00:12:51 -08:00
iSazonov
8abb6c3a94 Implicitly convert value assigned to XML property to string (#2678)
Using LanguagePrimitives.ConvertTo (to emulate what would happen if the property were a regular .Net property typed as string), we now convert the value assigned to an XML property to string.
2016-12-02 15:43:10 -08:00
Aditya Patwardhan
fbb5c16eb9 Disable help content test for Microsoft.Powershell.Archive module (#2835)
The published help content filename is missing '.psm1', but the help still
works. The bug is in PlatyPS and needs to be fixed to re-enable this test.
2016-12-02 15:32:03 -08:00
Paul Higinbotham
d2bf6294ab SSH remoting cmdlet parameter set changes based on RFC 0010 (#2710)
* RFC 0010 SSH remoting cmdlet updates.

* Tweaks to SSH remoting cmdlets

* SSHTransport parameter is now optional instead of mandatory.  Aded fix for CoreCLR entry point when hosted in SSH as a subsystem.

* Added tests

* Code review feedback

* Code review comment changes

* Making SSHTransport switch parameter mandatory because otherwise existing Invoke-Command parameter set

* The new SSH parameter set was causing legacy positional based parameters to no longer work. This fix separates the SSH parameter sets from the existing WinRM parameter sets.

* Fixed region name spelling error.
2016-12-02 14:01:08 -08:00
Jason Shirk
19a0d993e7 Remove one more extra Expression.Block call (#2833) 2016-12-02 13:23:09 -08:00
Jonathan Malek
77c622eeea Wrapping a call to Registry so that Invoke-WebRequest does not fail on non-text responses (#2811)
* Wrapping a call to Registry with a check for Platform.IsWindows
2016-12-02 11:38:38 -08:00
Aditya Patwardhan
d9d97a43ca Add ErrorAction Stop so DeviceGuard function (#2825)
A non-terminating error is thrown when the namespace does not exist by
Get-CimInstance. The namespace is not present on OS versions below Windows
10. It is not caught in the try-catch unless ErrorAction Stop is added.
2016-12-02 11:16:11 -08:00
Jason Shirk (POWERSHELL)
0cd1a0ff48 Remove unneeded blocks 2016-12-01 13:46:56 -08:00
Jason Shirk (POWERSHELL)
386b4f37f4 Remove CheckForSevereException and private FailFast
Our private implementation of FailFast was likely introduced
when each individual application needed it's own code to
get Watson reports. The CLR takes care of this for us now,
so we don't need our implementation.

Our method CheckForSevereException was also introduced in
the early days of the CLR - the exceptions it was checking
for aren't actually raised the CLR anymore, they just FailFast.
I removed them as there is a tiny bit of overhead (in code size)
and also in the generated code, e.g. dynamic sites called the method.
2016-12-01 13:46:56 -08:00
Aditya Patwardhan
19c709b986 Added check for empty $nugetArtifacts (#2817)
When the build fails there are no $nugetArtifacts, so AddRange fails
2016-12-01 12:58:14 -08:00
Staffan Gustafsson
5484b98a7a Moving New-Guid to compiled cmdlet (#2752) 2016-12-01 11:36:42 -08:00
James Truher [MSFT]
8e360bffb1 modify Start-PSPester to accept -Quiet to eliminate Pester output (#2795)
* modify Start-PSPester to accept -Quiet to eliminate Pester output

also modify travis.ps1 to include -Quiet for Pester args to reduce
stdout log size which should hopefully allow daily builds to run
without being cancelled due to too much output

* Add error detail information as part of Test-PSPesterResults

Test-PSPesterResults will now also emit information about the errors
found during a test run rather than just the number of failed tests.
Created a new errorlog function so the output of errors will be red.
2016-12-01 11:23:14 -08:00
Hemant Mahawar
b51b52d6b2 Update issue-management.md (#2823)
* Added description for 2 'committee' tags
* Fixing slashes direction
2016-12-01 11:19:02 -08:00
Dongbo Wang
e9fdf8e842 Temporarily disable Update-Help and Save-Help tests in CI builds
Also fix a flaky Start-Sleep test
2016-11-30 13:02:32 -08:00
Dongbo Wang
62af9b792f Revert the timer change introduced in #2640 because it causes race conditions 2016-11-30 13:02:32 -08:00
Aditya Patwardhan
991d6075af Added -publish to codecoverage package generation and fixed package name (#2797)
* Added -publish to codecoverage package generation and fixed package name

Added -Publish to Start-PSBuild used by CodeCoverage configuration so that
.netcore dependencies are also included in the package. This makes the
package usable on systems that do not have .netcore in path.

Fixed the name of the coverage package by making it consistent with other
package names.

* Created a function to generate packagename
2016-11-28 17:57:04 -08:00
Jason Shirk
7015e66bae Use -split operator to avoid error from new overload (#2796) 2016-11-28 14:01:45 -08:00
Kirk Munro
f971cd3dfe Fixed typo (#2782)
You might want to correct this in the notes associated with the release as well (I don't seem to be able to edit that).
2016-11-28 10:00:54 -08:00
Aditya Patwardhan
dcce8a21af Added -erroraction silentlycontinue for import-module (#2778)
If the module is not available it throws an error. To make sure OpenCover
works on PSv4 and below, -erroraction silentlycontinue was added.
2016-11-23 17:41:24 -08:00
Aditya Patwardhan
157e9480eb Assigned all ArrayList.Add() to $null (#2776)
* Assigned all ArrayList.Add() to $null
ArrayList.Add() returns the array list size after the add. This causes the
value to be thrown on the pipeline. Assigning them to $null as we do not
need to know the size after addition. This causes errors and unnecessary
output on the AppVeyor console.
* Changed the way nuget artifacts are added to arraylist
* Remove unnecessary `$null =` for `AddRange` call because it's a void method.
2016-11-23 16:38:50 -08:00
Dongbo Wang
6f92140886 Add back -Configuration 'Release' to make sure AppVeyor CIs produce 'Release' bits (#2773) 2016-11-23 12:54:52 -08:00
Aditya Patwardhan
ead4df4097 Moved publishing of code coverage artifacts to test_script phase (#2760)
* Moved publishing of code coverage artifacts to after_test phase

The webhook for build completion is called after the after_test phase
hence we needed to publish code coverage artifacts before that. Moved the
logic for compression and publish the artifacts after running tests.

* Added check for daily build

* Address code review comments.

* Addressed code review comments

Addressed comments about definition of artifacts.
Defined new function for after_test phase.
2016-11-23 12:22:18 -08:00
Steve Lee
3d94e35f21 updated error messages to tell user what to do (#2766) 2016-11-23 11:50:18 -08:00
iSazonov
d543195bd4 Fix Verbs<> class strings #2716 (#2762)
* Fix Verbs
* Replace `-runspace` with `-Session`
2016-11-23 09:19:15 -08:00
Sergei Vorobev
d64c80f729 Remove obsolete entries in FAQ.md (#2755) 2016-11-22 23:12:24 -08:00
Dongbo Wang
581050ec43 Update docs with release alpha.13 (#2765)
* Update docs with release alpha.13
* Additional doc updates
* Update the 'Get PowerShell' table
2016-11-22 17:50:45 -08:00
Manikyam Bavandla
67e9bf6376 - Fixed failing PackageManagement related tests in daily-builds (#2759)
- Updated Restore-PSModule function to delete the PSGetModuleInfo.xml so that this file will not be included in the PowerShell release.
- Since PackageManagement module gets installed with PowerShellGet module, removed PackageManagement module name in Restore-PSModule command invocation.
2016-11-21 17:36:51 -08:00
Mike Richmond
cac96e5fc9 Fixing powershell.exe lib paths and more thoroughly cleaning the powershell-native directory (#2758) 2016-11-21 16:55:03 -08:00
Dongbo Wang
20a0ba041c Fix the indicator for redirecting standard input (#2749) 2016-11-21 16:02:52 -08:00
Sergei Vorobev
172b2234fc Fix broken travis.ps1 logic (#2739) 2016-11-21 09:48:41 -08:00
Mike Richmond
bfd6d65458 Add x86 CrossGen support (#2726) 2016-11-20 12:59:50 -08:00
Sergei Vorobev
471594c6ab Make Start-PSBootstrap on macOS better
No errors if brew dependencies already present
2016-11-19 23:52:16 -08:00
Sergei Vorobev
5ff63e50b7 Make Restore-PSModule -Name parameter a [string[]] 2016-11-19 23:52:16 -08:00
Jianyun Tao
1fff6760b6 Removed PowerShellGet source and replaced with ones from myget 2016-11-19 23:52:16 -08:00
Jianyun Tao
9b27d4a23a add psmodulerestore in travis.ps1 2016-11-19 23:52:16 -08:00
Jianyun Tao
bfe59b3495 # This is a combination of 3 commits.
# The first commit's message is:

Changed to PSModuleRestore switch, i.e., by default no PSModule install

# This is the commit message #2:

install PowerShell modules to publish folder as well as one level up

# This is the commit message #3:

removed workaround
2016-11-19 23:52:16 -08:00
Jianyun Tao
00d5f9c884 remove packagemanagement test code 2016-11-19 23:52:16 -08:00