Commit graph

1384 commits

Author SHA1 Message Date
Andrew Schwartzmeyer
ad94ddb3f1 Guard IsWinPEHost 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
89508ae99d Revert IsWinPEHost changes 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
a9484e45e9 Remove Platform.SupportsRemoveDrive query 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
dbe16ca5d7 Remove Platform.SupportsReparsePoints query 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
465e55d32a Remove Platform.HasNetworkDriveSupport query 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
662e390902 Remove Platform.HasGroupPolicySupport query 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
ab882cb04d Remove Platform.UseDotNetToQueryFileAttributes query 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
2249afcd0a Remove Platform.HasUNCSupport query 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
58fe228dc0 Remove Platform.HasFileShares query 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
527f30a013 Remove Platform.HasSingleRootFilesystem query 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
e6c037c666 Remove Platform.HasExecutionPolicy query
Also change Get-ExecutionPolicy to not throw, but to return
Unrestricted (which is the effect of the actual policy).
2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
73a1a51f69 Remove Platform.HasRegistry query 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
c2cd059aa8 Remove Platform.HasDriveAutoMounting query 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
c9a4197af1 Remove Platform.HasAmsi query 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
46cfa26812 Remove Platform.HasCom query 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
5ef851a170 Port NativeItemExists for Linux
Without using .NET
2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
e89fa7b1dc Clean up IsExecutable and IsSymLink 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
4e518fe1c7 Remove Platform class override of PlatformNotSupportedException
This was confusing and unused in most places, exception itself removed
in cleanup.
2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
093587fecb Rename Native so it is Unix.NativeMethods
Like the rest of PowerShell.
2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
6a23655b2f Rename LinuxPlatform to Unix
Since it supports both Linux and OS X. This follows the .NET Core
convention.
2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
551e2e6fc4 Format CorePsPlatform 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
77a9b4b5d2 Remove unnecessary throws in CorePsPlatform 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
90a5382b30 Add bool IsFile(char*) to libpsl-native 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
3dacf45789 Revert NativeItemExists changes from baseline 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
955d5f8bcb Add bool IsDirectory(char*) to libpsl-native 2016-07-14 17:34:12 -07:00
Sergei Vorobev
3276846c40 Merge pull request #1367 from PowerShell/vors/3-dlls
Bring .cs code for CimCmdlets, WSMan.Management and WSMan.Runtime dlls
2016-07-14 16:17:45 -07:00
Sergei Vorobev
3e105225cf Merge pull request #1375 from PowerShell/cchen/bugfix
msft:8027609 Get-Module -List and Test-ModuleManifest import the the …
2016-07-14 16:08:31 -07:00
Sergei Vorobev
a655c9a27b Add AssemlbyInfo.cs files
- Microsoft.WSMan.Runtime
- Microsoft.WSMan.Management
- Microsoft.Management.Infrastructure.CimCmdlets
2016-07-14 15:40:56 -07:00
Manikyam Bavandla MSFT
735456a12a Merge pull request #1378 from PowerShell/psget
Ignoring the errors from Receive-Job cmdlet in Uninstall-module logic…
2016-07-14 14:32:43 -07:00
Sergei Vorobev
58de8914b1 Downgrade Microsoft.WSMan.Management dependency so we can use the one from sources 2016-07-14 13:46:29 -07:00
Sergei Vorobev
eb0d6905ab Fix ResourceManager instantiation in WsManHelper.cs 2016-07-14 13:46:29 -07:00
PowerShell Team
160ab847d5 Convert txt resources into resx for Microsoft.WSMan.Management 2016-07-14 13:46:29 -07:00
PowerShell Team
bc6990f46b Copy cs files from [SD:717473]
commit 96877403a6a2eb9dcbee0f71bbc6dfb6e61dd9a3

- Microsoft.WSMan.Runtime
- Microsoft.WSMan.Management
- Microsoft.Management.Infrastructure.CimCmdlets
2016-07-14 13:46:29 -07:00
Sergei Vorobev
132d98e3c7 Add project.json files
- Microsoft.WSMan.Runtime
- Microsoft.WSMan.Management
- Microsoft.Management.Infrastructure.CimCmdlets
2016-07-14 13:46:29 -07:00
Sergei Vorobev
5802a02786 Add map.json files
- Microsoft.WSMan.Runtime
- Microsoft.WSMan.Management
- Microsoft.Management.Infrastructure.CimCmdlets
2016-07-14 13:46:29 -07:00
Manikyam Bavandla
6a1ad57e42 Ignoring the errors from Receive-Job cmdlet in Uninstall-module logic, this is a workaround for #1365 2016-07-14 13:37:08 -07:00
Quoc Truong
ac7bed909e Merge pull request #1359 from PowerShell/quoct/onegettest
Enable test for PackageManagement on CorePowerShell
2016-07-14 13:26:01 -07:00
Chunqing Chen
080f029d8a msft:7980238, 7768797 Test-ModuleManifest loads all available modules if a module has the nested module dependencies. Get-Module -List and Test-ModuleManifest import the the nested module dependencies into the current runspace. 2016-07-14 13:21:28 -07:00
Chunqing Chen
bd0ba6771c msft:8027609 Get-Module -List and Test-ModuleManifest import the the nested module dependencies into the current/global runspace. 2016-07-14 12:42:47 -07:00
Quoc Truong
3af74154af Place #if !LINUX at more appropriate places 2016-07-14 10:24:09 -07:00
Raghu Shantha [MSFT]
2dad0d4a82 Merge pull request #1351 from PowerShell/RaghuS-AppxProviderBranch
Remove AppxProvider from PowerShell Codebase and builds
2016-07-14 10:05:37 -07:00
Andy Schwartzmeyer
d0ad3b719b Merge pull request #1352 from PowerShell/andschwa/username
Implement Get-Process -IncludeUserName for Linux
2016-07-13 17:27:11 -07:00
Andrew Schwartzmeyer
894f8401a1 Fix CreateSymLink tests for OS X
/tmp is symlinked to /private/tmp and since we're testing symlink
resolution through FollowSymlink, we need to change what we expect to
the realpath.
2016-07-13 16:00:10 -07:00
Indhu Sivaramakrishnan
1dc0b9a813 Merge pull request #1358 from PowerShell/insivara-ps
Updated Microsoft.PowerShell.ScheduledJob to have version 3.0.0.0
2016-07-13 15:59:22 -07:00
Andrew Schwartzmeyer
2a790591f0 Clean up CreateSymLink tests 2016-07-13 15:56:12 -07:00
Andrew Schwartzmeyer
85d9370c2f Clean up FollowSymlink 2016-07-13 15:55:15 -07:00
Andrew Schwartzmeyer
d44d485938 Fix FQDN test for OS X 2016-07-13 15:46:25 -07:00
Andrew Schwartzmeyer
2abe461992 Refactor to use GetUserFromPid 2016-07-13 15:46:25 -07:00
Andrew Schwartzmeyer
900b46d281 Add GetUserFromPid() to libpsl
And clean up some tests.
2016-07-13 15:46:25 -07:00
Andrew Schwartzmeyer
8ac64286e1 Refactor libpsl to use GetPwUid() 2016-07-13 15:46:25 -07:00
Andrew Schwartzmeyer
f3328fec5c Add tests for native GetFileOwner 2016-07-13 15:46:25 -07:00
Andrew Schwartzmeyer
e6d3cbcce0 Implement Get-Process -IncludeUserName for Linux
So much plumbing. The correct way to identify the owner of a process on
Linux is to get the owner of the /proc/<PID> file. However, .NET Core
has no API to get this information, thus it had to be plumbed through to
the native library.
2016-07-13 15:46:25 -07:00
Andrew Schwartzmeyer
13a82a59ee Add GetFileOwner 2016-07-13 15:46:25 -07:00
Andrew Schwartzmeyer
0b114a3b71 Add GetStat
Wraps stat() with mapped errno.
2016-07-13 15:46:25 -07:00
Andrew Schwartzmeyer
c17244eed2 Fix IsAdministrator for Unix 2016-07-13 15:46:25 -07:00
Indhu Sivaramakrishnan
1f9343ece2 Updated Microsoft.PowerShell.ScheduledJob to have version 3.0.0.0 2016-07-13 15:07:22 -07:00
Manikyam Bavandla
bb4eadba1d Corrected a typo in $PSVariable
Corrected a typo in $PSVariable
2016-07-13 14:13:41 -07:00
Manikyam Bavandla
87db56d17f Changes for Get-ChildItem, Select-Object, IsWindows, IsCore and IsLinux
Changes for Get-ChildItem, Select-Object, IsWindows, IsCore and IsLinux
2016-07-13 14:13:41 -07:00
Manikyam Bavandla
076ad7f8e9 Added mapping for $env:TEMP path in Linux.
Added mapping for $env:TEMP path in Linux.
2016-07-13 14:13:41 -07:00
Manikyam Bavandla
df271c48cc PowerShellGet changes for Linux 2016-07-13 14:13:41 -07:00
Andy Schwartzmeyer
a39beee33d Merge pull request #1264 from PowerShell/childitem
Fixing symlink to use absolute paths instead of relative
2016-07-13 12:57:26 -07:00
Raghu Shantha [MSFT]
0d6851ce95 Remove AppxProvider from PowerShell Codebase and builds 2016-07-13 11:21:56 -07:00
quoctruong91
5ba47748c1 Remove logging for installation from OneGet on Linux 2016-07-12 21:17:11 -07:00
quoctruong91
50c3e5bfc8 Fix Install PackageProvider failure because we are not running on administrator 2016-07-12 21:17:11 -07:00
Travis Plunk
6ac0e1afdb Merge pull request #1336 from PowerShell/FixExecutionPolicyForWindows2
Fix execution policy for windows
2016-07-12 16:40:16 -07:00
Travis Plunk
bf905966de Fixed comments and white space issues 2016-07-12 14:38:19 -07:00
Travis Plunk
dc632bff96 Fixed unreachable code issue 2016-07-12 12:11:07 -07:00
Travis Plunk
9a9ff6f766 Removed language if statement no longer needed due to compiler if statement
Clarified comment
2016-07-12 11:27:31 -07:00
Travis Plunk
547d5da804 Made check blocking execution policy, only blocking (always returning true) on linux 2016-07-11 18:54:05 -07:00
Raghu Shantha [MSFT]
eb4ddeee01 Update sources instead of project.json 2016-07-11 16:03:59 -07:00
Raghu Shantha [MSFT]
9121a807d5 Add exclude attribute to correct location in project.json 2016-07-11 14:48:50 -07:00
Raghu Shantha [MSFT]
3d1abb0b8c Exclude PackageSourceList from building on *nix platforms 2016-07-11 13:48:17 -07:00
Dongbo Wang
7a1c81e1f4 Update and clean up module files in Core/Full/Shared folders 2016-07-11 11:26:49 -07:00
Andy Schwartzmeyer
43f07425e9 Merge pull request #1283 from PowerShell/andschwa/readlinesafe
Implement ReadLineSafe for Linux
2016-07-08 17:02:49 -07:00
Andrew Schwartzmeyer
64a5cae4cb Remove char k 2016-07-08 16:46:26 -07:00
Andrew Schwartzmeyer
152b106375 Use Control-F/B for Right/Left arrow 2016-07-08 16:19:05 -07:00
Andrew Schwartzmeyer
7ae448f0b1 Blacklist control characters rather than whitelist 2016-07-08 16:17:32 -07:00
Andrew Schwartzmeyer
85aa47b489 Use Control-D for delete 2016-07-08 16:16:35 -07:00
Jason Shirk
5e1cbe0e5d Merge pull request #1328 from PowerShell/dongbo/type-completion
Fix issue #682 - [system.manage<Tab>] doesn't work
2016-07-08 16:16:32 -07:00
adityapatwardhan
e1017523c1 Merge pull request #1327 from PowerShell/adityap/stackoverflow
Fix stackoverflow issue by using strongly typed resource names
2016-07-08 15:41:46 -07:00
Aditya Patwardhan
46b3a58c35 Fix stackoverflow issue by using strongly typed resource names 2016-07-08 15:01:35 -07:00
Dongbo Wang
81b92583e1 Fix #682 - [system.manage<Tab>] doesn't work 2016-07-08 14:18:20 -07:00
Dongbo Wang
da7f6ba3b2 Move the most recent changes about the ALC from SD to Github 2016-07-08 14:18:20 -07:00
Dongbo Wang
436b5c9f27 Exclude the P/invoke code that is not supposed to be in CoreCLR build 2016-07-08 14:18:20 -07:00
Andrew Schwartzmeyer
50e6627a8e Throw PlatformNotSupported on Windows .NET Core build 2016-07-08 14:08:22 -07:00
Andrew Schwartzmeyer
5dd5aaf007 ReadLineFromConsole improvements
Also more guarding in ReadLineSafe
2016-07-08 13:48:51 -07:00
Andrew Schwartzmeyer
68875f0942 Handle Ctrl-C while prompting 2016-07-08 13:48:51 -07:00
Andrew Schwartzmeyer
3572367c00 Implement ReadLineFromConsole for Linux 2016-07-08 13:48:51 -07:00
Andrew Schwartzmeyer
53a3b760cd Remove ReadLineSafe from known issues 2016-07-08 13:48:51 -07:00
Andrew Schwartzmeyer
50e31e68bb Implement ReadLineSafe for Linux
This uses System.Console instead of ConsoleControl to read keys into a
SecureString in a portable manner. The Windows implementation is left
untouched.
2016-07-08 13:48:51 -07:00
Andrew Schwartzmeyer
6200f084cd Invoke-Item and Get-Help -Online are unsupported on Nano
These currently fail at runtime on Nano, and will continue to do so. But
this implements these much needed cmdlets for Open PowerShell.

If there is a way to determine that PowerShell is being run on the Nano
OS at runtime, then we could instead throw a platform unsupported
exception, but this cannot be based on the target compilation framework,
as .NET Core is shared for both Nano and Windows.
2016-07-08 13:48:36 -07:00
Andrew Schwartzmeyer
09f20879b8 Guard use of UseShellExecute in PackageManagement
To re-enable elevation, the process will need to fork. For now, don't
fail fatally.
2016-07-08 13:48:36 -07:00
Andrew Schwartzmeyer
ef2ba40ca7 Use start in Invoke-Item to open items on Windows
Since `UseShellExecute` cannot be used.
2016-07-08 13:48:36 -07:00
Andrew Schwartzmeyer
afc1d8a459 Use start in Get-Help -Online to open URL on Windows 2016-07-08 13:48:36 -07:00
Andrew Schwartzmeyer
ce2e5d6492 Set UseShellExecute to false in Get-Help 2016-07-08 13:48:36 -07:00
Andy Schwartzmeyer
4f98ee7418 Merge pull request #1316 from PowerShell/jasonsh/psreadline_windows_fixes
Fix UNIX/Windows/CORE story for PSReadLine
2016-07-08 09:48:49 -07:00
Alex Jordan
e8386bd4b9 changing logic around realpath in followsymlink 2016-07-07 15:46:58 -07:00
Alex Jordan
0dc248b6f9 changes to logic in followsymlink 2016-07-07 15:02:23 -07:00
Alex Jordan
2a6b32ce5b Refactored followsymlink 2016-07-07 14:54:47 -07:00
Alex Jordan
64496d7bcc adding check for symlink to followsymlink 2016-07-07 12:12:16 -07:00