Sergei Vorobev
825352faa3
Separate Done() and Dispose() in ProcessInputWriter NativeCommandProcessor.cs
2016-11-15 17:16:44 -08:00
Sergei Vorobev
1508526a3f
Fix recursive Done() problem in steppable pipeline finalization
2016-11-15 14:49:39 -08:00
Sergei Vorobev
7914c75504
Fix bug in native pipe, where we loose End() output
2016-11-15 14:49:39 -08:00
Sergei Vorobev
0ce50a82a7
Resurect Xml serialization logic inside ProcessInputWriter
2016-11-15 14:49:39 -08:00
Sergei Vorobev
e038360087
Prettify NativeCommmandProcessor.cs
...
- Move ProcessOutputHandler outside of NativeCommmandProcessor
- Remove redundent ConsumeAvailableNativeProcessOutput() blocking call
2016-11-15 14:49:39 -08:00
Sergei Vorobev
f0a4a7d821
Replace spin-lock by a proper BlockingCollection in NativeCommandProcessor
2016-11-15 14:49:39 -08:00
Sergei Vorobev
89782f92d2
Clean-up unnesesary fields from NativeCommandProcessor
2016-11-15 14:49:39 -08:00
Sergei Vorobev
a6fc5387c2
Add a code to handle finished process correctly on Unix
2016-11-15 14:49:39 -08:00
Sergei Vorobev
666bf887d7
Use StreamWriter.Dispose() instead of Close()
2016-11-15 14:49:39 -08:00
Sergei Vorobev
df6662aa2e
Fix flushing mechanics for input writer in native pipe
2016-11-15 14:49:39 -08:00
Sergei Vorobev
747f5ff164
Make native pipeline consume available output in the process block
2016-11-15 14:49:39 -08:00
Sergei Vorobev
b93042670f
Improve pipeline for native commands
...
- Start native process in Prepare() instead of Complete()
in NativeCommandProcessor.
- Remove unneeded input, output, error threads. Replaced by
simpler primitives.
2016-11-15 14:49:39 -08:00
Jason Shirk (POWERSHELL)
0d3021c5ca
Delay initialize some properties in InformationRecord
...
An InformationRecord instance is created when calling Write-Host,
but many of the properties aren't read.
It can be expensive to initialize some of those properties, so
the code has been changed to initialize those properties on first access.
2016-11-14 14:03:30 -08:00
Jason Shirk
bd9e49d8d9
Make Out-Null fast ( #2629 )
...
People use Out-Null despite much faster alternatives:
$null = Do-Stuff
[void] = Do-Stuff
Do-Stuff > $null
This change makes Out-Null work in roughly the same say as the above.
The optimization is to detect that we're calling the built-in Out-Null
cmdlet when invoking a pipeline from script (the change won't have any
effect in the PowerShell api). If we detect Out-Null, we rewrite the
pipe to look similar to `Do-Stuff > $null`.
2016-11-11 11:29:53 -08:00
iSazonov
b56bbeabc6
Add Get-Uptime to Microsoft.PowerShell.Utility (C# cmdlet) ( #2517 )
...
* Add Get-Uptime (C# code)
1. Add Get-Uptime cmdlet (C# code)
2. Modify psd1 files
3. Add tests
* Remove Pretty parameter after Powershell committee conclusion
1. Remove Pretty parameter
2. Remove tests for Pretty
3. Add Throw if IsHighResolution is False
4. Fix formatting
* Add test to check throw
1. Add hook that simulate 'System.Diagnostics.Stopwatch.IsHighResolution == false' to test Get-Uptime throw
2. Add test to check throw
* Fixes after review
1. Remove Timespan parameter
2. Remove unneeded tests
3. Fix localization
4. Add string consts
5. Fix throw
* Fix OutputType to add parameter set name information
2016-11-10 09:51:29 -08:00
Nana Lakshmanan
2077e42b52
Fixing background jobs for Unix and Windows ( #1972 )
2016-11-09 22:44:39 -08:00
Francisco Gomez Gamino
fea4d883e8
Fixing update/save-help on Linux.
2016-11-04 16:39:57 -07:00
Adam Driscoll
28f32cabe6
Adding support for ENABLE_BINDER_DEBUG_LOGGING in CORECLR.
...
Fix to also print dynamic expressions
2016-11-03 15:06:35 -07:00
Jason Shirk
c8c55b7ce7
Fix NullReferenceException in binder ( #2591 )
...
There was a NullReferenceException after turning on constrained language mode
if creating a binding on a thread with no runspace.
The fix is to assume if there is no runspace that we are not in constrained language
mode, and also generate a binding restriction that assumes the same.
2016-11-03 14:15:58 -07:00
nitinbps
f4c1569421
Get-ChildItem -Recurse -ErrorAction Ignore doesn't ignore the errors ( #2503 )
...
Get-ChildItem -Recurse -ErrorAction Ignore doesn't ignore the errors for some specific files under a folder and instead terminate the pipeline.
2016-11-02 11:26:51 -07:00
Jason Shirk (POWERSHELL)
f65312dbc0
Don't block pipeline when running windows exes
2016-11-01 14:15:31 -07:00
Chunqing Chen
0908547083
Remove the unnecessary use of lock in PseudoParameterBinder to avoid deadlock ( #2501 )
...
This is the fix to MSFT:9039127 [RFC] : SMA Jobs stop processing, show various status but never change or progress; due to deadlock in sandbox process.
The fix is brought to GitHub to make sure GitHub powershell always has the latest changes.
2016-10-18 17:32:56 -07:00
Dongbo Wang
f02b6ef97a
Exclude 'Registry' and 'Certificate' providers from UNIX PS since they don't work on UNIX platform.
...
With this change, 'Registry' and 'Certificate' providers won't be compiled for UNIX PS.
2016-10-14 10:02:44 -07:00
Dongbo Wang
d0c60e049d
Avoid calling static members from 'Microsoft.Win32.Registry' on UNIX, especially the code that would run in TypeInitializer.
...
This is because with the latest .NET Core packages (1.1.0 preview), calling static members from 'Microsoft.Win32.Registry' will raise 'PlatformNotSupportedException'.
2016-10-14 10:02:44 -07:00
Steve Lee
9e47ad4733
Addressing static code analysis issue ( #2470 )
...
* Addressing static code analysis issue: Add CultureInfo to 'Type.InvokeMember' calls
* Addressing code review feedback
* Fixed build break
2016-10-13 14:46:21 -07:00
Francisco Gamino
d717458e7d
Fixing get-help <cmdletName> -online for .NET Core on Desktop. ( #2174 )
...
In PS Core on windows, we try to locate the default web browser and use it for online help. If we cannot find the default web browser (in NanoServer/IoT), we error out.
2016-10-12 12:16:32 -07:00
Mike Richmond
e188c992e8
Fixing JSON property accessor to attempt user settings directory creation on the first write operation
2016-10-07 21:45:38 -07:00
charub
6526968947
Fix Start-Transcript input path validation issues. ( #1749 )
2016-10-05 16:18:50 -07:00
charub
88d64c243e
Fix Start-Transcript input path validation ( #1749 )
2016-10-05 16:18:50 -07:00
Dongbo Wang
13455204a4
Fix variable assignment to not overwrite readonly/constant variables ( #2400 )
2016-10-03 15:25:52 -07:00
Dongbo Wang
5fbde6eb40
Fix bytewise operators to work on enum types with 'System.Byte' as the underlying type ( #2411 )
2016-10-03 15:24:39 -07:00
Dongbo Wang
124a59b8a8
Merge pull request #2363 from lzybkr/maxvars
...
Remove most Maximum* capacity variables
2016-09-28 17:28:16 -07:00
Jason Shirk (POWERSHELL)
f252683e90
Remove SessionStateOverflowException
...
This exception is no longer used by PowerShell, so it has been removed.
It is a public api, so removing it risks breaking somebody. Nobody has any reason
to catch or throw this exception, so it seems safe to remove, but I decided to
be conservative and keep it for Windows PowerShell. It seems safe enough to remove
in Nano.
2016-09-28 15:47:08 -07:00
Mike Richmond
9f9add03f6
Fixing PowerShellProperties.json reads to do a basic validity check prior to processing the JSON
2016-09-28 10:55:48 -07:00
Charu Bassi
5cbf1b43de
Fix 'Get-ChildItem -Hidden' to work on system hidden files like c:\hiberfil.sys c:\pagefile.sys and c:\swapfile.sys
2016-09-27 16:13:03 -07:00
Jason Shirk (POWERSHELL)
c7951e13c0
Remove most Maximum* capacity variables
...
MaximumErrorCount is fixed at 256 (we may want to consider an environment variable to make this bigger)
MaximumAliasCount, MaximumDriveCount, MaximumFunctionCount, and MaximumVariableCount have been removed.
2016-09-26 15:16:35 -07:00
Dongbo Wang
89b5ae5de1
Fix $? assignment to not crash powershell
2016-09-26 11:56:12 -07:00
Dongbo Wang
bf59194c6e
Fix binary operator tab completion ( #2338 )
2016-09-22 11:56:38 -07:00
Sergei Vorobev
6992a6479a
Merge pull request #2260 from jsoref/spelling-public
...
Fix spelling in public APIs
2016-09-19 17:33:46 -07:00
Sergei Vorobev
a266f11b00
Merge pull request #2182 from douglaswth/fix-passing-escaped-double-quoted-spaces-to-native.exe
...
Fix passing escaped double quoted spaces to native executables
2016-09-14 19:07:56 -07:00
Sergei Vorobev
4ee52fe3d2
Merge pull request #2259 from jsoref/spelling-debug
...
Spelling debug
2016-09-14 19:04:34 -07:00
Dongbo Wang
fdd514108c
Improve the logic to detect PSHome module path derived from a different powershell core instance.
2016-09-14 15:19:12 -07:00
Dongbo Wang
9179cecd01
Refactor method names related to 'PSHomeModulePath' and 'SharedModulePath'
2016-09-14 15:19:12 -07:00
Paul Higinbotham
0ba1e2d9d1
Minor improvements to SSH remoting cmdlets ( #2249 )
...
* Fix for relative paths for KeyFilePath cmdlet parameter, renamed cmdlet KeyPath parameter to KeyFilePath parameter, and added tests.
* Code review comment update
* Added missing KeyFilePath check
* Test fix from review comment
2016-09-14 15:13:10 -07:00
Josh Soref
fb467d497d
spelling: error ids in ErrorRecord ( #2258 )
2016-09-14 12:51:07 -07:00
Sergei Vorobev
81a598f242
Merge pull request #2089 from 0xfeeddeadbeef/master
...
Use prefixed QNames in XPath expressions used by all implementations of ICmdletProviderSupportsHelp interface
2016-09-13 15:14:46 -07:00
Douglas Thrift
8bca1f50c5
Fix passing escaped double quoted spaces to native executables
2016-09-13 13:37:42 -07:00
Paul Higinbotham
79ddafcc85
Fix for Linux remote script debugging hang ( #2213 )
...
* Fix for Linux remote debugging hang bug.
* Removing dependency in PSReadLine on new engine helper API since it needs to be compatible with V3.
2016-09-13 11:31:48 -07:00
George Chakhidze
7ce34224c2
Remove '.ni' from module help file name (indicating a Ngen binary)
...
Fixes #2088
2016-09-13 09:40:14 +04:00
Josh Soref
9d5b14ee5f
spelling: debug src/System.Management.Automation/engine/runtime
2016-09-01 16:02:13 +00:00