Commit Graph
293 Commits
Author SHA1 Message Date
Mike Richmond b291e2006c Fixing implementation of GetModulePath to conform to the requirements of #1184. 2016-08-04 13:15:34 -07:00
Mike Richmond 8ffb717e14 Reducing exception catching within ConfigPropertyAccessor classes to provide greater control to callers regarding the most appropriate way to handle them. 2016-08-04 13:15:34 -07:00
Mike Richmond 419db0e832 Removing dependency on JSON .Net for FullClr 2016-08-04 13:15:34 -07:00
Mike Richmond 33c1f2db23 Fixing execution policy so test automation works 2016-08-04 13:15:34 -07:00
Mike Richmond f8b9b88986 Bug fixes and cleanup in preparation for push. 2016-08-04 13:15:34 -07:00
Mike Richmond e6e785ec92 Added module path support. Not plumbed trhough yet. 2016-08-04 13:15:34 -07:00
Mike Richmond 2c365356b6 Adding UpdatableHelp checks. 2016-08-04 13:15:34 -07:00
Mike Richmond 73689d697a ExecutionPolicy is now working from JSON files 2016-08-04 13:15:34 -07:00
Mike Richmond 4b8eff2817 Backing up in-progress changes to work on other stuff 2016-08-04 13:15:34 -07:00
Jason Shirk f15e66b283 Merge pull request #1633 from PowerShell/revert_psedition_namechange
Revert the changes made in #1457. Desktop and Core are the PowerShell Edition names. Remove Linux as edition name.
2016-08-04 12:21:12 -07:00
Dongbo Wang 43bda97c98 Make the assembly version of AssemblyLoadContext.dll to be 3.0.0.0, so that the ALC.dll from OPS can work with existing native hosts in NanoServer 2016-08-04 10:43:57 -07:00
Manikyam Bavandla 5eef2cacc4 Removed Linux PSEdition name 2016-08-03 15:53:31 -07:00
Manikyam Bavandla eacfd9418c Revert "Merge pull request #1458 from PowerShell/psedition_rename"
This reverts commit 042d1e99bb, reversing
changes made to 105bf9c9ff.
2016-08-03 15:53:31 -07:00
Jason Shirk 31b3d13e10 Merge pull request #1623 from PowerShell/jimtru/PSDriveFreeSpaceFix
Get-PSDrive should report proper free space on all platforms
2016-08-03 14:11:28 -07:00
Jason Shirk (POWERSHELL) 2b70837d98 Set remoting PSVersionTable private data in a downlevel compatible manner 2016-08-03 13:21:42 -07:00
Jason Shirk (POWERSHELL) 2b74b89f76 Add serialization support for SemanticVersion 2016-08-03 13:20:07 -07:00
PowerShell Team c1ee6c9d6d Refactoring - replace always null expressions with null 2016-08-03 12:14:28 -07:00
PowerShell Team c3ce30e34a Refactoring - use is operator instead of GetType() where possible 2016-08-03 12:14:28 -07:00
PowerShell Team 22d2273ce4 Refactoring - use ?? in more places 2016-08-03 12:14:28 -07:00
PowerShell Team 85d6e9f022 Refactoring - adjust modifiers declaration order 2016-08-03 12:14:28 -07:00
PowerShell Team ae8d2ed794 Refactor - convert to auto-property
Mostly using R# to automatically refactor, with some manual
fixups where it wouldn't work automatically (e.g. xml comments
on fields) or some it seemed to miss.

Some minor code reformatting was also done on properties near
other stuff I was manually inspecting.
2016-08-03 12:14:28 -07:00
PowerShell Team bc4901bd59 Remove unused using statements 2016-08-03 12:06:06 -07:00
Jason Shirk (POWERSHELL) 38ab0f4d73 update csproj references 2016-08-03 12:06:06 -07:00
James Truher 1bbdaa7ea8 Change free/used calculation to be consistent across platforms
add a couple of tests to validate return values
2016-08-03 10:38:26 -07:00
James Truher 9597a47689 change linux diskfree calculations from using /bin/df as a source of data to [io.driveinfo] 2016-08-03 10:38:26 -07:00
James Truher fb953c16b8 fix for Get-PSDrive to get free and used space on Non-Windows systems 2016-08-03 10:38:26 -07:00
Sergei Vorobev 25c89310a4 Bump MMI dependency to alpha04
alpha04 has following changes:
- libmi.so is not included in this package. It will be brough
  as a separate nuget package later.
- all unix runtimes are replaced by generic unix runtimes to
  enable easier builds on new unix platforms.
2016-08-02 17:54:07 -07:00
Paul Allen b529951598 Merge pull request #1604 from PowerShell/split-psrp-shared-library
split the wsman apis into client/server shared libraries
2016-08-02 13:57:07 -07:00
Jason Shirk cfba7537f3 Merge pull request #1599 from PowerShell/error-stream
Error stream
2016-08-02 12:15:13 -07:00
Paul Allen a7f58b2026 split the wsman apis into client/server shared libraries 2016-08-02 11:40:09 -07:00
Jason Shirk (POWERSHELL) 75eab56e21 csproj fixes
- add some missing references
- fix assembly name so InternalsVisibleTo works
2016-08-02 10:50:51 -07:00
Sergei Vorobev 161940c9aa Don't apply red color to error stream output 2016-08-01 18:40:50 -07:00
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
Jason Shirk 9742b64170 Merge pull request #1591 from lzybkr/code_formatting
Code formatting
2016-08-01 16:46:05 -07:00
Jason Shirk (POWERSHELL) c34ef6141b Use nameof() where we use reflection
We use a lot of reflection, and when you rename a member (e.g. when running
the code formatter), it doesn't detect references where you're using reflection.

By using nameof(), we can now find these references (e.g. a build break) instead
of failing at runtime.
2016-08-01 15:58:17 -07:00
PowerShell Team 403ae3f53f Initial run of code formatter
I (Jason Shirk) ran https://github.com/dotnet/codeformatter with the default rules, basically:

    codeformatter /nocopyright "/c:DEBUG,UNIX,CORECLR" @files.rsp

This caused a few problems building, which were fixed up manually.

Notable changes:

`this.` is removed unless needed to disambiguate.
private instance fields are renamed to have a `_` prefix.
private static fields are renamed to have a `s_` prefix.

I left some projects alone (like PackageManagement) and also left some generated code alone.
2016-08-01 15:57:03 -07:00
Mike Richmond 19138f3f62 Fixing reverse PInvoke worker callback pointer structure layout to synchronize it between managed and unmanaged code. 2016-08-01 15:02:52 -07:00
John Kordich a0339d4a12 Linux DSC MOF compilation changes 2016-07-29 16:29:52 -07:00
Sergei Vorobev e9606ac793 Change MMI package to alpha02 2016-07-29 12:24:02 -07:00
Sergei Vorobev dcde9bd583 Revert back to old MMI package, until we fix regression 2016-07-29 08:49:33 -07:00
PowerShell Team 0dd425da19 Integrate changes between [SD:717473] and [SD:725290] 2016-07-28 18:02:24 -07:00
Dongbo Wang 14433e6b1f Update project.json files to keep sync with the new MMI nuget package 2016-07-28 17:07:57 -07:00
Sergei Vorobev a704a53f08 Make Get-Item env: case-aware on Unix
Fix #1196
2016-07-28 14:19:36 -07:00
Jason Shirk (POWERSHELL) 9a20bf6f97 Change $PSVersionTable.PSVersion to 6.0.0-alpha 2016-07-27 10:53:11 -07:00
Jason Shirk (POWERSHELL) be8e39782f Add SemanticVersion type 2016-07-27 10:53:11 -07:00
Andrew Schwartzmeyer 41173a3b65 Rename IsCore to IsCoreCLR 2016-07-26 11:54:08 -07:00
Andrew Schwartzmeyer 9ba6ba359d Re-enable assembly name comparison 2016-07-26 11:54:08 -07:00
Andrew Schwartzmeyer b400ba3688 Use CORECLR to guard analysis progress record 2016-07-26 11:53:53 -07:00
Andrew Schwartzmeyer f0e64c2c6c Clean up ApplicationBase work-around 2016-07-26 11:49:54 -07:00
Andrew Schwartzmeyer d40131ae44 Clean up PSMODULEPATH Windows work-around 2016-07-26 11:49:54 -07:00