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.
* First iteration
* Second iteration
* Third iteration
* Fourth iteration
* Fifth iteration
* Revert the temporary workaround
* beta.1 release only support Mac OSX 10.12+
* 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
`$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.
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`.
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
* 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.
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 --% *
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.
When 'Remove-Item' is used to remove a symbolic link in Windows, only the link itself is removed. The '-Force' switch is no longer required.
If the directory pointed to by the link has child items, the cmdlet no longer prompts the user to remove the child items---those child items are not removed. The '-Recurse' switch, if given, is ignored.
This brings 'Remove-Item' more in line with the behavior of the 'rm' command on Unix.
This is limited to the console host and is not meant as generalized telemetry code for PowerShell Core. It will capture the GitCommitID and Platform Information when the console host starts. It enables opting out of sending telemetry.
* Caching the parent id of the current process
In certain scenarios, like a domain joined machine with an executionpolicy set via GPO, a lot of checks are done for the ExecutionPolicy, and this is in the hot path.
* Caching HasGPScriptParent.
It is expensive to determine if a script was run as a result of applying a group policy. This does not change during the lifetime of a process.
This only affect the scenario when an execution policy has been set by a group policy.
* Using available Microsoft.PowerShell.ProcessCodeMethods.GetParentPid
* fixes summary block typo
* Adds support for Port parameter for SSH PSSessions
* Reverted back to master, modified based on PR feedback
* Update exception message
* remove unused line
* Add existing constructor back in as to not break public contract
* remove port check
* pass nested inner exception straight to Should
* dispose runspace after each test
* Add SSHHostParameterSet attribute for Invoke-Command Port property
* Update ParseSSHConnectionHashTable method to accept Port value as integer
* Add helper method for validating port in range. Refactor port parameter constructor overload to use original constructor
* rename method
* Adds GetSSHConnectionStringParameter and GetSSHConnectionIntParameter methods for retrieving SSHConnection hashtable values
* Adds method comments
* Adds helper method comment
* Change methods to add C# 7 patterns
string. If the string was a uri with spaces, ToString() doesn't return the escaped version. The AbsoluteUri property
should be used instead which returns an escaped absolute uri (if valid).
Also renamed TestModuleManfest.ps1 to TestModuleManifest.Tests.ps1 so that it gets picked up correctly as Pester test.
Since HelpInfoUri is just a string, ensure it is a valid absolute uri and escaped correctly whereas before it was just
an opaque string that wasn't validated.
* Add dockerfile and test so we can test simple remoting behaviors
this docker file creates an image which can be used to test remoting with containers.
We start with the microsoft/windowsservercore image and then set up the system for
testing by adding a user, setting up configuration for basic auth, installing
PowerShell Core, and creating a configuration endpoint for PSCore.
The tests are very simple; it retrieve $PSVersionTable.PSVersion in the following
connections:
Full -> Full
Full -> Core
Core -> Full
Core -> Core
* Add new file to bootstrap the docker image
fix the tests to be more resilient to changes in the version of the PSCore package
* update script to use local user cmdlets rather than net.exe
also remove pscore.msi at the end of the image build process to save space
* clean up commented lines and remove an unused parameter from one of the functions
also use constants more consistently
* remove reference to docker image name by string and use variable instead.
Rather than relying on case-insensitive string compares of source and destination paths, use operating system calls to determine whether two paths refer to the same file. This solves not only the case-insensitivity issue but also allows the cmdlet to operate properly if the destination is a hard or symbolic link to the source.
The Windows side is implemented in C#. The Unix side is implemented partially in native code.