Go to file
Sergei Vorobev a12eff96c0 Change formatter for ErrorRecord
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.
2016-08-01 18:39:57 -07:00
.github fixed the broken links and other minor updates due to the recent learning-powershell path changes. 2016-08-01 11:37:15 -07:00
.vscode Enable external console for VS Code debugging 2016-07-21 16:18:32 -07:00
assets Added ability to choose install location, issue #1135 2016-06-27 16:04:57 -07:00
demos Merge pull request #1510 from PowerShell/maertend-patch-3 2016-07-29 10:16:23 -07:00
docs Merge pull request #1596 from PowerShell/raghushantha-windowsinstall-1 2016-08-01 16:34:19 -07:00
src Change formatter for ErrorRecord 2016-08-01 18:39:57 -07:00
test Merge pull request #1566 from PowerShell/andschwa/chars 2016-07-29 09:10:10 -07:00
tools Move GITHUB_TOKEN in tools/download.sh 2016-07-21 10:51:59 -07:00
.gitignore Update .gitignore files 2016-07-24 09:17:22 -07:00
.gitmodules Move modules shared between frameworks in Module/Shared folder 2016-07-01 12:20:48 -07:00
.travis.yml Whitelist master and test branches for Travis CI 2016-07-24 15:30:20 -07:00
appveyor.yml Merge pull request #1526 from PowerShell/jameswtruher/TagPesterTests 2016-07-27 14:39:32 -07:00
build.psm1 Fix Start-DevPowerShell to use upercase for PSMODULEPATH (unix) 2016-07-28 11:47:36 -07:00
build.sh Use -noprofile in build.sh 2016-05-18 14:25:17 -07:00
CHANGELOG.md Drafted update to contribution guidelines 2016-07-19 16:36:08 -07:00
global.json Add global.json for dnu restore from root 2015-11-24 15:07:55 -08:00
LICENSE.txt add MIT license to root 2016-07-29 14:11:52 -07:00
nuget.config Remove MyGet feeds 2016-06-27 15:30:47 -07:00
powershell.sln Add csproj files and sln for editing but not building 2016-07-05 10:27:41 -07:00
README.md update README with license info 2016-07-29 14:15:46 -07:00

logo 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)
av-image tv-image

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.

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.