Commit graph

4869 commits

Author SHA1 Message Date
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
jeffbi ee1a897f91 Prevent Get-ChildItem from recursing into symlinks (#3780)
Brings the Get-ChildItem more in line with the Unix ls -r and the Windows DIR /S native commands. Like these commands, the cmdlet will display symbolic links to directories found during recursion but will not recurse into them.
Like the Unix ls command---and unlike the Windows DIR /S command--- the cmdlet will recurse into symlinks given on the command line.
2017-05-15 14:09:46 -07:00
Dongbo Wang 2d06c17093 update the doc about hosting powershell with a sample that uses beta.1 packages (#3770) 2017-05-12 15:25:41 -07:00
Aditya Patwardhan 89638a814e Enable Get-TimeZone for Unix platforms since required classes are available in .Net Standard 2.0. (#3735) 2017-05-11 16:27:52 -07:00
Steve Lee 6775031656 Update README.md (#3757)
Need to update the privacy statement link to the broader one
2017-05-11 10:32:10 -07:00
Dongbo Wang 95f96bc50d Update releasing.md about NuGet package suffix (#3759) 2017-05-11 10:30:19 -07:00
Joey Aiello e43dcf4d23 Beta 1 known issues doc (#3583) 2017-05-10 15:52:19 -07:00
Travis Plunk c06caa95d2 Add locales package and only generate locale after adding package (#3756) 2017-05-10 12:47:22 -07:00
Dongbo Wang ee779b58e0 Update docs for beta.1 release (#3748)
* First iteration

* Second iteration

* Third iteration

* Fourth iteration

* Fifth iteration

* Revert the temporary workaround

* beta.1 release only support Mac OSX 10.12+
2017-05-10 09:49:02 -07:00
Andrew e70e410741 Installation docs update for Debian 8 and RHEL 7 (#3709)
* Debian8 update

* RHEL7 update

* Main page update

* Fixed 'MD024 Multiple headers with the same content'

* Update linux.md

Added explicit text about compatibility of Ubuntu14.04 pkg on Debian8 to avoid confusion about URLs

* Update linux.md
2017-05-09 13:18:01 -07:00
Dongbo Wang c8a9284731 Temporary workaround #2 to fix the PSVersion issue in beta.1 release (#3742) 2017-05-09 00:21:28 -07:00
Dongbo Wang 44c6409fdd Temporary workaround to fix the PSVersion issue in beta.1 release (#3740) 2017-05-08 22:52:30 -07:00
Dongbo Wang 74382288ca Update CHANGELOG.md for 'v6.0.0-beta.1' release (#3736) 2017-05-08 17:58:12 -07:00
Steve Lee 63429445f9 Relax SemanticVersion constructors to not require minor and patch (#3696)
`$psversiontable.psversion -gt "3.0"` which is used by PowerShellGet to determine if a module is compatible with the current version of PowerShell.

Change is to allow specifying only major or major+minor where the missing segments default to zero by providing overloaded constructors and allow
the string parsing method to not require major, minor, and patch segments to all be specified (only major is required).

Based on the [response](https://github.com/mojombo/semver/issues/368) from the maintainer of semver, there is no requirement to have strict
conformance for the inputs to the constructor and allowing "3.0" to result in a semver of 3.0.0 is reasonable.
2017-05-08 10:44:40 -07:00
Dmitrii Evdokimov 5938688d86 Fix a pipe char in the table formatting (#3714)
Set the proper escaping for a pipe char inside of a cell text in Markdown.
2017-05-07 22:38:07 -07:00
Staffan Gustafsson 8d744f2517 Use '<id> - <name>' as ToolTip and ListItemText when tab completing process ID (#3664) 2017-05-05 18:05:21 -07:00
Dongbo Wang 3175d25762 Update 'Build.sh' to allow building powershell manually on Unix (#3710) 2017-05-05 15:17:01 -07:00
jeffbi 938e13602b Change error message when using New-Item to create a symlink and the item exists (#3703) 2017-05-05 10:09:34 -07:00
Ilya d275cee214 Correct formatting in PSVersionInfo (#3694) 2017-05-05 09:21:27 -07:00
jeffbi 3e416fb642 Change Get-ChildItem to list the content of a link to a directory on Unix. (#3697)
Brings Get-ChildItem in line with ls command on Unix and with the PowerShell behavior on Windows when the link is a directory symbolic link.
2017-05-04 18:00:13 -07:00
Dongbo Wang 1b16f77e21 Update powershell to use .NET Core 2.0.0-preview1-002106-00 (#3699)
Use 2.0 CLI/SDK of version `2.0.0-preview1-005952` to keep in sync with the .NET Core 2.0 //Build dogfood instructions. The version of `Microsoft.NetCore.App` in use is `2.0.0-preview1-002106-00`.
2017-05-04 17:09:03 -07:00
Ilya 42cb8ba643 Move 'PSVersion' and 'PSEdition' to first and second places in $PSVersionTable (#3562) 2017-05-03 21:33:52 -07:00
James Truher [MSFT] 563806c15d Change native execution tests to use df instead of stty (#3685)
when automating test execution, some environments don't have a tty which causes
the tests to fail. df is just as good a test as stty as it is also guaranteed to be
present. This change also allows the tests to be run on OSX
2017-05-02 18:45:35 -07:00
jeffbi 2a739afa9c Fix Rename-Item to allow Unix globbing patterns in paths (#2799) (#3661)
* Fix Rename-Item to allow Unix globbing patterns in -Literal paths (#2799)

In the process of normalizing a relative path, PowerShell checks to see
see if the path exists, which it does by invoking
    Directory.EnumerateFiles(directory, filename);

On Unix platforms, if the filename contains globbing patterns, such as [ab],
EnumerateFiles (and EnumerateDirectories) will perform the globbing. Using
globbing patterns, a file named 'file[txt].txt' is reported as not existing.

This fix changes the file-existence test on Unix to use a native function
instead of either of the Directory.EnumerateXXX functions.

* Fix for AppVeyor failure

* Changes per code review, and a couple of letter-casing changes.
2017-05-02 18:42:16 -07:00
Steve Lee 0187d9e110 Add statement to README.md covering the current telemetry implementation (#3673)
Add statement regarding the current telemetry implementation to address concerns from Privacy Review
2017-05-02 18:27:42 -07:00
Jason Shirk dccce7e8a3 Update class grammar comments (#3688) 2017-05-02 15:36:20 -07:00
Sergei Vorobev c7e377891b Add updating homebrew instruction (#3533) 2017-05-02 15:34:12 -07:00
Mike Richmond 0f5e9f876e Add documentation about the Univeral C Runtime dependency (#3495) 2017-05-02 10:14:17 -07:00
Ilya 3d7ef43498 Improve ValidateCount attribute error message (#3656)
Leave only two message for ValidateCount attribute error:
1. Count is not in allowed range.
2. Count is not exactly equal allowed value.
2017-05-02 10:04:52 -07:00
Dongbo Wang 52336b8fda Diable schema validation in ScriptWriter.cs (#3679) 2017-05-02 09:40:53 -07:00
Dongbo Wang 73e5dc3020 Make sure nuget package version suffix applies to all ProjectReference (#3678) 2017-05-01 22:34:25 -07:00
Chunqing Chen 9051ca1fbc PSVersionTable should have entry for OS and Platform (#3654) 2017-05-01 21:04:49 -07:00
Chunqing Chen 5a82b10fc7 Get-Help should find help files under pshome (#3528) 2017-05-01 13:54:01 -07:00
Bruce Payette 11ad02a15a Adding support for native command globbing on UNIX (#3643)
This change enables globbing (wildcard expansion) against the file system for native commands like '/bin/ls'. The expansion is only done in the file system. In non-filesystem drives expansion is not done and the pattern is returned unchanged.

Limitations of the fix:
Currently quoting is not honored so for a command like /bin/ls "*.txt", wildcard expansion will still be done. Adding support for bare word detection will come in a future PR. Use --% to suppress wildcard expansion e.g. git add --% *
2017-05-01 12:23:36 -07:00
Andrew c0aafdb3d0 Fixing a bug related to ModuleSpec syntax in RequiredModules (#3594)
This fixes issue #2607.
'RequiredModules' is a field in module manifest that can reference other modules using ModuleSpecification format.
The basic version of this format (just module name) was working fine, however, there was a problem when a more detailed version of the format was used (the one that uses module versions or/and GUIDs).
During module import, there is a check for cyclic references through 'RequiredModules' field. The bug was in this check for cyclic references, related to comparison rules for ModuleSpecification objects - as a result, the code was incorrectly reporting 'cyclic reference' error in cases when there was none.
Also, added tests for different ModuleSpecification formats and a test for error when there is actually a cyclic reference.
2017-04-30 17:58:44 -07:00
Dongbo Wang 08e855556c Mark '-SkipCertificateCheck' tests pending on OSX for now (#3660)
Mark two tests pending on OSX due to #3648
2017-04-27 18:15:59 -07:00