Commit Graph
100 Commits
Author SHA1 Message Date
Andrew Schwartzmeyer 2260cf7469 Improve Linux installation instructions 2016-07-27 13:13:12 -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
Andrew Schwartzmeyer cf8ddc10d6 Remove deprecated guard of resource verification 2016-07-26 11:49:54 -07:00
Andrew Schwartzmeyer a1c7d127eb Add WSManPluginWrapper to AssemblyLoadContext
This function is required for PSRP on Linux, as we need to wrap the call
into WSManPluginManagedEntryWrapper.InitPlugin such that it is invoked
via reflection from an assembly loaded with our custom context.
2016-07-25 15:22:56 -07:00
Andrew Schwartzmeyer bcfe498ef4 Guard ProgressPane for pseudo-TTYs
Again due to the fact that relying on Console.IsOutputRedirected (as
System.Console does for these APIs) causes bugs when pseudo-TTYs are
used (since the output is not redirected, but the APIs nonetheless can't
be used properly). So we ran into a problem where the value of CursorTop
and Console.BufferHeight were lies, and so we accidentally attempted to
set it numbers below zero. Guard everything.
2016-07-24 17:13:39 -07:00
Andrew Schwartzmeyer 79daea0132 Remove deprecated catch
These colors can be set now.
2016-07-24 16:20:46 -07:00
Andrew Schwartzmeyer 6513830e8c Whitelist master and test branches for Travis CI
Only pull requests, merges to master, and branches starting with the
prefix "test" will trigger Travis CI builds.
2016-07-24 15:30:20 -07:00
Andrew Schwartzmeyer 59cf766604 Update debugging instructions for VS Code 2016-07-21 16:37:44 -07:00
Andrew Schwartzmeyer 9a9b6eddcb Enable external console for VS Code debugging
Instead of half-running PowerShell with -noninteractive (and expecting
the user debugging to enter more arguments), the latest stable version
of VS Code allows us to launch an external console. This requires either
Gnome Terminal or xterm (sadly not Xfce Terminal), but given either (and
xterm is almost always available to install), we can now launch an
interactive PowerShell session to debug.
2016-07-21 16:18:32 -07:00
Andrew Schwartzmeyer 8eda0df29e Remove CommandLineParameterBinderNativeMethods
This was dead code. PreParseCommandLine was called only when tracing was
enabled, which meant that the tracing itself was useless, as it was not
tracing what the actual code was doing.

I believe the intention of this tracing was to "guess" how the native
commands on Windows *might* parse their command-line arguments, but the
traced result was not guaranteed to be accurate. Since we cannot provide
accurate tracing, the tracer was removed in its entirety.

The PreParseCommandLine function was the only place where
CommandLineToArgv was called, so with it removed, the entire native
methods class here can be removed.
2016-07-21 10:39:16 -07:00
Andrew Schwartzmeyer c9c3e0b9be Remove managed CommandLineToArgv
It is entirely unused.
2016-07-21 10:39:16 -07:00
Andrew Schwartzmeyer a51b8d500b Mark feed dependent NuGet tests as pending
The feed/credential combo has stopped working, breaking all CI runs.
2016-07-19 15:30:23 -07:00
Andrew Schwartzmeyer f9ed7e84fb Mark failed NuGet test as pending
Once the clean-up stage on Linux / OS X was fixed, this test stopped
passing. This test should be fixed.
2016-07-19 15:12:12 -07:00
Andrew Schwartzmeyer 472947bf76 Fix use of rm alias in tests
This is not an alias on Linux / OS X.
2016-07-19 15:12:12 -07:00
Andrew Schwartzmeyer 0f04de1e96 Fix some documentation warnings
Mostly low-hanging fruit and Linux additions/changes.
2016-07-18 19:08:28 -07:00
Andrew Schwartzmeyer 790a07222e Disable some XML documentation warnings
Some projects have more warnings than I can fix.
2016-07-18 19:07:32 -07:00
Andrew Schwartzmeyer b6f26ad7cc Enable XML documentation generation
This is enabled for PowerShell projects, but not PackageManagment,
WSMan, Cim, or MMI.
2016-07-18 18:40:42 -07:00
Andrew Schwartzmeyer af9c4cb673 Don't build packages for pull requests
Since we don't want to build packages for pull requests (as they cannot
get archived as artifacts), we need a slightly different build command,
and moving it to a script was cleaner.
2016-07-18 12:44:28 -07:00
Andrew Schwartzmeyer ea930d3346 Remove Slack CI notifications 2016-07-18 12:23:05 -07:00
Andrew Schwartzmeyer 49bd13b642 Use os instead of matrix
Travis is being picky about how this is specified.
2016-07-18 11:40:10 -07:00
Andrew Schwartzmeyer 0f7748a70b Add CentOS support 2016-07-18 10:59:23 -07:00
Andrew Schwartzmeyer 8ef8f9fada Add GitHub token as insecure environment variable
This should enable building via PR from forks.

This token has read-only access to download the installer packages, but
should nonetheless be revoked and replaced with a wget download when the
repository goes public.
2016-07-18 10:00:46 -07:00
Andrew Schwartzmeyer b745d75f1b Test PSReadLine's DefaultEditMode and bindings 2016-07-15 13:43:29 -07:00
Andrew Schwartzmeyer c6758603ae Set DefaultEditMode to Emacs on Linux / OS X 2016-07-15 13:40:16 -07:00
Andrew Schwartzmeyer b3ef98036d Set bindings based on options
This is instead of hard-coding a call to SetDefaultWindowsBindings().
2016-07-15 13:39:29 -07:00
Andrew Schwartzmeyer ab83e00475 Refactor switch into SetDefaultBindings(EditMode) 2016-07-15 13:38:55 -07:00
Andrew Schwartzmeyer ed39a00f29 Add GetLStat
faccessat() does not support AT_SYMLINK_NOFOLLOW on OS X, so instead,
we use the success of lstat() to determine if the file (not following
symbolic links) exists. Also allowed for some refactoring.
2016-07-14 19:45:14 -07:00
Andrew Schwartzmeyer 70aa6af960 Remove unnecessary indirection from Platform.Unix 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer 74c3262f03 Fix failing New-Item tests
PowerShell expects the behavior of NativeItemExists to not follow
symbolic links.
2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer 35e24ce6d4 Clean up CreateSymLink() 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer 32e0a7dcaa Format New-Item.Tests.ps1 2016-07-14 17:34:12 -07:00
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
Andrew Schwartzmeyer a4dec332b4 Import Pester from new location
This is somewhat temporary as we're about to investigate using upstream
Pester without needing to have it as a submodule, and failing that,
moving it to a vendor folder.
2016-07-14 11:14:05 -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
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 92495065e8 Guard Linux native build steps
So that non-zero exit codes fail the build, and the tests are run
verbosely.
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 6f938bd860 Add regression test for Get-Process -IncludeUserName 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
Andrew Schwartzmeyer 281c7cf17a Fix AppVeyor version 2016-07-13 13:56:39 -07:00
Andrew Schwartzmeyer dd2f97c0aa Enable caching of dotnet and NuGet packages on CI 2016-07-13 13:56:25 -07:00
Andrew Schwartzmeyer 8d23dad0ab Add Read-Host regression test 2016-07-08 13:48:51 -07:00
Andrew Schwartzmeyer 9a7199b05b Enable Invoke-Item test for 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
Andrew Schwartzmeyer 19a4f4faf5 Fix IsUbuntu logic in build module
I previously broke the automatic uninstallation logic by changing how I
identified the Linux distribution.
2016-06-30 13:41:43 -07:00
Andrew Schwartzmeyer 2e927d8155 Disable xUnit tests
This is temporary. We need to rewrite the test context to ensure the
AssemblyLoadContext is used properly, since the default can no longer be
initialized.
2016-06-28 20:08:11 -07:00
Andrew Schwartzmeyer 4086644de7 Disable JIT cache tests
This test fails since we've disabled the JIT cache entirely.
2016-06-28 20:08:11 -07:00
Andrew Schwartzmeyer 2360d1ef46 Filter runtime assemblies out of custom context 2016-06-28 19:19:55 -07:00
Andrew Schwartzmeyer 5a29df50f1 Re-enable assembly load handler in CompletionCompleters 2016-06-28 18:31:38 -07:00
Andrew Schwartzmeyer 5e3150f429 Use Start-TypeGen to generate type catalog dynamically 2016-06-28 12:57:44 -07:00
Andrew Schwartzmeyer 36df477c01 Update type catalog without MMI 2016-06-27 15:30:47 -07:00
Andrew Schwartzmeyer 5744ca7b80 Exclude MMI packages from type catalog parser
Newtonsoft.Json will be excluded at a later date.
2016-06-27 15:30:47 -07:00
Andrew Schwartzmeyer a3a0bb9a62 Add NETStandard.Library to CoreCLR.Eventing
As a bottom-level dependency, it always needed it. The alternative is
hunting down every particular dependency, but that's what the
meta-package is useful for.
2016-06-27 15:30:47 -07:00
Andrew Schwartzmeyer 2f892e8127 Use Marshal.ZeroFreeCoTaskMemUnicode
This removes the ClrFacade function of the same name as this API is in
.NET Core 1.0 Marhsal class, not SecureStringMarshal.
2016-06-27 15:30:47 -07:00
Andrew Schwartzmeyer 8be714ff68 Update CorePsTypeCatalog for new packages 2016-06-27 15:30:47 -07:00
Andrew Schwartzmeyer db60a859cf Remove MyGet feeds 2016-06-27 15:30:47 -07:00
Andrew Schwartzmeyer 2f303f3822 Use dotnet-test-xunit package from NuGet 2016-06-27 15:30:47 -07:00
Andrew Schwartzmeyer bf6b5be10d Use Microsoft.DotNet packages available on NuGet 2016-06-27 15:30:47 -07:00
Andrew Schwartzmeyer d2aef87029 Depend on SecureString 4.0.0 2016-06-27 15:30:47 -07:00
Andrew Schwartzmeyer f21618f119 Remove SecureString stub project 2016-06-27 15:30:47 -07:00
Andrew Schwartzmeyer 97df59f553 Re-enable checking of assemblies with strong names
This removes the `UsesCodeSignedAssemblies()` switch in `CorePsPlatform`
and reverts the work-arounds skipping strong name checking.
2016-06-27 14:49:46 -07:00