Commit graph

5617 commits

Author SHA1 Message Date
Steve Lee 2b7c22335f Remove unncessary check for Paths.count > 0 as there is code later to use the current (#5596)
Remove unnecessary check for Paths.count > 0 as there is code later to use the current working directory since -Path is not a mandatory parameter.
Updated ShouldProcess to output the internal action on adding paths rather than the user action (which is the cmdlet name).

Updated tests to not specify -Path

Fix #5594
2017-12-01 17:34:30 -08:00
Travis Plunk 0dfc1f4257 Remove exclusion for hang and add context exception for remaining instances (#5595) 2017-12-01 17:34:30 -08:00
Dongbo Wang 308d03e7a7 Update PowerShell executable name in using-vscode.md (#5593) 2017-12-01 17:34:30 -08:00
Dongbo Wang 130ec8bb81 Skip null-element check for collections with a value-type element type (#5432)
* Fix NotNullOrEmpty check logic

* Fix a test issue on Unix
2017-12-01 17:34:30 -08:00
Chunqing Chen 22abe98c05 Fix xunnit test for PS (#4780)
* Initial work to enable xunit

* Moved AssemblyOriginatorKeyFile to csharp.tests.csproj

* Native binary has dylib extension on macOS
2017-12-01 17:34:30 -08:00
Dan Travison fef44277ee Use explicit libpsl-native binary name for dllimport. (#5580) 2017-12-01 17:34:30 -08:00
Steve Lee 38e22bb177 output url so when test fails you can more easily troubleshoot (#5570) 2017-11-29 17:27:47 -08:00
Jonathan Muller a12bd1768e Clean up use of 'Runspaceconfiguration' from comments and xunit test code (#5569) 2017-11-29 17:27:47 -08:00
Travis Plunk 3f9ff3f06d Make 'AllSigned' execution policy require modules under $PSHome to be signed (#5511) 2017-11-29 17:27:47 -08:00
Travis Plunk 8ec31afe80 Update docker file for windows build (#5459)
reducing the base image size should make the build a little faster
Also, remove the duplicate upload of a file
2017-11-28 17:53:57 -08:00
Chris 724095e39f Remove PerformWSManPluginReportCompletion from pwrshplugin.dll (#5498)
This resolves issue #5391, which is tagged with 6.0.0-GA, therefore this should help with getting pwsh out of the door in January.

It removes PerformWSManPluginReportCompletion as stated in the issue and its associated class member g_pPluginContext, which is now unused as well.

The best reviewer is probably @mirichmo , who raised the initial issue with very helpful descriptions or @dantraMSFT who is currently assigned to the issue.
2017-11-28 17:53:57 -08:00
Chris 5650ce2d90 Add PowerShell VSCode style settings (#5529) 2017-11-28 17:53:57 -08:00
Chris b0996e728f XML documentation fix for CompletionResult (#5550)
* XML documentation fix for CompletionResult: 1 typo, make text start with upper case and add periods at the end.
This typo showed up on the official docs site: https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.completionresult.-ctor?view=powershellsdk-1.1.0#System_Management_Automation_CompletionResult__ctor_System_String_

* Add periods to private members as well as suggested in PR.
2017-11-28 17:53:57 -08:00
Troy Lindsay ada9bd4289 Add Travis CI matrix for improved job tagging (#5547) 2017-11-28 17:53:57 -08:00
Steve Lee aae076e046 remove signed folder in zip during packaging (#5527) 2017-11-28 17:53:57 -08:00
Steve Lee e55814aca7 updated install link and instructions for R-Pi (#5495)
* updated install link and instructions for R-Pi
* remove libicu57 as it's not needed
2017-11-28 17:53:57 -08:00
PRASOON KARUNAN V 6d72ec300a Added more helpful message for AmbiguousParameterSet exception (#5537) 2017-11-28 17:53:57 -08:00
Ilya f2f0bcf8ff Fix the path to 'powershell_xxx.inc' in Start-Build (#5538) 2017-11-28 17:53:57 -08:00
bergmeister ee8b039ed1 Disambiguate icon for daily builds on Windows (#5467)
* Disambiguate icon for daily builds on Windows.
Some code had to be borrowed from build.psm1 because this script has to be self contained in case it gets executed by only downloading this file via the published download link https://twitter.com/Steve_MSFT/status/930585082451992576
2017-11-28 17:53:57 -08:00
Mark Kraus 2689338617 Fix Import-CliXml Tests (#5521)
Add checks that ProcessName is not null or empty.
2017-11-28 17:53:57 -08:00
Travis Plunk 827f154bf5 Replace strlen with strnlen in native code (#5510)
* fix expected vs actual for easier troubleshooting
* replace strlen calls with strnlen
2017-11-28 17:53:57 -08:00
Travis Plunk 4adaf731a4 Fix docker tests (#5508)
* update expected version
* update container list
2017-11-21 15:57:34 -08:00
Mark Kraus 28fa53a77c [Feature] Fix AppVeyor Fails (#5520) 2017-11-21 15:57:34 -08:00
bergmeister cc942a222b Change synopsis of install-powershell.ps1 to reflect that it works cross-platform (#5465) 2017-11-21 15:57:34 -08:00
Travis Plunk 2a5d4c43d3 Fix mac packaging (#5496) 2017-11-17 17:26:00 -08:00
Travis Plunk e110fe4093
update version regex for nanoserver docker (#5494) 2017-11-17 16:47:24 -08:00
Aditya Patwardhan 9e99d59621 Updated docs and scripts for rc release (#5481) 2017-11-17 09:09:28 -08:00
Dongbo Wang f8bb55fa78
Minor update to releasing.md (#5489) 2017-11-17 09:05:42 -08:00
Dongbo Wang 58f978001b
Update the ChangeLog.md for RC release (#5483) 2017-11-16 17:19:30 -08:00
Travis Plunk e2c7e02099 Fix semantic version parsing (#5480) 2017-11-16 10:17:31 -08:00
Travis Plunk 90f455b9ec
fix MSI version parsing (#5475) 2017-11-15 18:43:14 -08:00
Travis Plunk 35a46a75bc
add mac release build scripts (#5474) 2017-11-15 17:10:19 -08:00
Dongbo Wang 97511a9e2a
Fix the regex for '-ReleaseTag' (#5473) 2017-11-15 16:55:13 -08:00
Aditya Patwardhan 381134ba59 Updated csproj to use the latest help package (#5454) 2017-11-15 16:29:04 -08:00
Dan Travison f7206690f1 Update PSRP version dependency (#5469) 2017-11-15 14:43:04 -08:00
Dongbo Wang 5f72faab54
Change to query for metadata from our file (#5468) 2017-11-15 13:54:30 -08:00
Travis Plunk 4007470403
Package signing (#5463)
* add template xml for package signing

* Add script to generate package signing XML

* remove uploading artifact, it always fails.

* Allow the XML to be updated to be specified
2017-11-15 13:03:32 -08:00
Steve Lee 2f8e691e05 Fix build in vscode (#5453)
- Fix build in vscode
- Add v2.0.0 tasks.json thanks to Keith Hill
- Add '/property:GenerateFullPaths=true' to build to fix the $mscompile 'problem matcher' not working issue.
2017-11-15 11:40:49 -08:00
bergmeister 019cfee82c Fix Start-PSBuild on WSL if repository was already built on Windows (#5346)
Replace the static `powershell.inc` filename with a name based on the current RID, so that the build doesn't confuse when running in the same local repository on WSL.
2017-11-15 10:52:06 -08:00
Travis Plunk 3c7cd11152 Get PowerShellGet from the PowerShell Gallery (#5452) 2017-11-15 10:19:25 -08:00
Travis Plunk 5d8999e8b5 Add HighEntropyVA to building pwsh (#5455)
Specify that the images (pwsh.dll in particular) support high-entropy 64-bit address space layout randomization (ASLR).
2017-11-15 10:12:03 -08:00
Darwin 0f41c185d7 Add support for installing powershell on Amazon Linux (#5461)
- Support for Amazon Linux
- Ensure both tarball installs will reinstall/upgrade
- Clean up comments with incorrect urls
2017-11-15 09:51:52 -08:00
Dongbo Wang c4f0d1c893
Add a test for the powershell hang fix (#5451)
- Add test for the powershell hang fix
- Ignore the 'Sync-PSTags' warning
2017-11-15 09:41:11 -08:00
Keith Hill cef7762d18 Add standard set of vscode workspace setting files (#5457)
* Add standard set of vscode workspace setting files

Add an extensions.json file that will prompt folks to install extensions that are recommended for this workspace (c++, c#, powershell, cmake (editing syntax) and markdown linter.

Add settings.json to start to configure C# syntax, PoweShell trim trailing whitespace and configure the markdown lint extension.

Update launch.json to provide ability to debug PowerShell scripts.

* Clean up grammar

* Instruct VSCode to ensure a final newline.

If this is not wanted for certain file types, we can restrict this option to only specified file types.
2017-11-15 11:18:37 +04:00
Paul Higinbotham 1962c273c6 Fix for PowerShell hang on exit (#5356)
CoreCLR doesn't call finalizer on process exit. PowerShell relies on the CLR finalizer to clean up state on exit. In this case, a Runspace pool was not closed or disposed and any pipeline worker threads created to run concurrent scripts won't end, causing the hang. The same thing can happen if any individual Runspace is created to run a concurrent script and is not closed.

We cannot use the `AppDomain.DomainUnload` event because it's not supported by the default load context. The `AppDomain.ProcessExit` event is also not helpful since it is only called during application exit which means threads already have to be cleaned up.

The fix introduces a static property called `PrimaryRunspace` to `Runspace`. When the PrimaryRunspace is closing it means that the PowerShell session is ending and on exit clean should be performed. The static property `PrimaryRunspace` can only be set once per process.
2017-11-14 14:01:11 -08:00
Steve Lee 89d1d92151 Update governance.md (#5437) 2017-11-14 11:15:31 -08:00
Mark Kraus c832e1687d Add PSTypeName Support for Import-Csv and ConvertFrom-Csv (#5389)
closes #5134

Adds PSTypeName preservation on Import-Csv and ConvertFrom-Csv
2017-11-14 11:15:18 -08:00
Steve Lee 83e1d64669 Enable install-powershell.ps1 to update the current running powershell (#5429)
1. Remove `[validate]` attribute from parameter so this script can be invoked directly from the web. This doesn't have any negative impact as the $Destination parameter will have a default value if null or empty.
2. Move removal of destination folder later as installing the package requires package management module and archive module (on Windows)
3. On Windows, because files have open handles when run from existing powershell-daily install, I rename the existing files and copy over the new ones.  User needs to exit and restart `pwsh` to take effect (similar to macOS/Linux where you have to exit and restart anyways)
2017-11-14 10:45:08 -08:00
Travis Plunk 31f7639552
Add compliance label description (#5355) 2017-11-14 10:37:24 -08:00
Travis Plunk 1d64cad068
Signing fixes (#5439)
* Add two files that need to be signed
* make sure to set PSModuleRestore to true when expanding a signed build because we run PSModuleRestore at that point.
* suppress output of CmdLets which are noisy
2017-11-14 10:30:17 -08:00