Fix #1465 On Linux, it's common to use error stream (2) as an information stream. There is no errors in this case, it's just a way to report info. When PowerShell redirects error stream, it wraps all output from stream 2 in NativeCommandError ErrorRecord. That doesn't happen for interactive experience (when there is no redirection), but it shows up in logs, scripting and non-console powershell hosts (i.e. PowerShell ISE). Here we change the formatter, so we are keeping the ErrorRecords objects, but we are changing their default representation. If it's a NativeCommandError, we don't use the regular ErrorRecord formatter. It allows us keep ErrorRecord object, but in redirection case it will look exectly like on the screen. Also, we are change NativeCommandErrorMessage to use one line per ErrorRecord to enable this scenario. |
||
---|---|---|
.github | ||
.vscode | ||
assets | ||
demos | ||
docs | ||
src | ||
test | ||
tools | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
appveyor.yml | ||
build.psm1 | ||
build.sh | ||
CHANGELOG.md | ||
global.json | ||
LICENSE.txt | ||
nuget.config | ||
powershell.sln | ||
README.md |
PowerShell
PowerShell is an automation and configuration management platform. It consists of a cross-platform command-line shell and associated scripting language.
New to PowerShell?
If you are new to PowerShell and would like to learn more, we recommend reviewing the getting started documentation.
Get PowerShell
You can download and install a PowerShell package for any of the following platforms.
Platform | Releases | How to Install |
---|---|---|
Windows | .msi | How to Install |
Ubuntu 14.04 | .deb | How to Install |
CentOS 7 | .rpm | How to Install |
OS X 10.11 | .pkg | How to Install |
Building the Repository
Linux | Windows | OS X |
---|---|---|
Instructions | Instructions | Instructions |
If you have any problems building, please consult the developer FAQ.
Build status of master branches
AppVeyor (Windows) | Travis CI (Linux / OS X) |
---|---|
Downloading the Source Code
The PowerShell repository has a number of other repositories embedded as submodules.
To make things easy, we can just clone recursively:
git clone --recursive https://github.com/PowerShell/PowerShell.git
If you already cloned but forgot to use --recursive
, you can update submodules manually:
git submodule update --init
See working with the PowerShell repository for more information.
Developing and Contributing
Please see the Contribution Guide for how to develop and contribute.
If you have any problems, please consult the known issues, developer FAQ, and GitHub issues. If you do not see your problem captured, please file a new issue and follow the provided template.
Legal and Licensing
PowerShell is licensed under the MIT license.
Code of Conduct
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.