Commit Graph
100 Commits
Author SHA1 Message Date
Andrew Schwartzmeyer 5235fed2c7 Refactor Start-PSPackage
Moved Unix package code into New-UnixPackage, switching on $Types to
call the appropriate function given the list of types.

Also fixed bug with chmod on a symlink; it was unnecessary.
2016-08-11 13:38:54 -07:00
Andrew Schwartzmeyer a3f3734f09 Include license during build
Rather than including it only at packaging, we should include this
license as part of `dotnet build` and `dotnet publish`.
2016-08-11 13:38:54 -07:00
Andrew Schwartzmeyer 1cc454fbd2 Update known issues
The "unavailable cmdlets" section was removed pending a comprehensive
list compiled from the module declarations.
2016-08-09 18:54:05 -07:00
Andrew Schwartzmeyer 5310423678 Remove Windows+Unix-Core
There are no longer module declarations that are identical between Core
PowerShell on Windows and on Unix.
2016-08-09 18:54:05 -07:00
Andrew Schwartzmeyer d59710d310 Remove unimplemented Management cmdlets from Unix
These are not currently implemented and so should not show up as
available.

The *-Computer cmdlets are already not compiled for Unix (and so not
available), so let's not declare them in the manifest.

The Get-ComputerInfo cmdlet does not work on Unix and so should not be
made available.

Test-Connection depends on an unavailable WMI provider.

Get/Set-TimeZone are not yet ported.
2016-08-09 18:54:05 -07:00
Andrew Schwartzmeyer f68cb8c385 Add copy of Management module declaration for Unix
Unmodified so we can track changes.
2016-08-09 18:53:44 -07:00
Andrew Schwartzmeyer e750fb6284 Move Management module declaration to Windows-Core modules
Since we need different versions for Windows and Unix.
2016-08-09 18:53:44 -07:00
Andrew Schwartzmeyer 280bd651c1 Remove unimplemented Utility cmdlets from Unix
ConvertFrom-SddlString and Unblock-File are Windows-specific cmdlets
with no equivalent on Unix.

squash! Remove Unblock-File from Unix
2016-08-09 18:53:43 -07:00
Andrew Schwartzmeyer 9c07b9f29d Add copy of Utility module declaration for Unix
Unmodified so we can track changes.
2016-08-09 17:50:06 -07:00
Andrew Schwartzmeyer c22dd04967 Move Utility module declaration to Windows-Core modules
Since we need different versions for Windows and Unix.
2016-08-09 17:50:06 -07:00
Andrew Schwartzmeyer 528f255dd8 Fix publishOptions for powershell-unix
While Unix builds were given their own module folder,
it was only being copied for build, not for publish,
thus breaking some builds.
2016-08-09 12:39:19 -07:00
Andrew Schwartzmeyer 1576172d23 Add Get/Set ExecutionPolicy cmdlets back to module
Without these declared in the Unix module manifest,
the related tests fail as the cmdlets cannot be found.
This is a regression.
2016-08-09 12:06:05 -07:00
Andrew Schwartzmeyer 0fc21db411 Fix Start-PSPester setup
Start-PSPester must ensure that the environment variable `PSMODULEPATH`
is not set before starting the new PowerShell process.
If it is set, then the tests are not guaranteed to be correct,
as they will be operating with the host process's `PSMODULEPATH`,
thus ignoring their own modules.

I also refactored the Start-PSPester command setup code.
2016-08-09 12:03:30 -07:00
Andrew Schwartzmeyer 4c830d5e32 Add Trace-Commands back to Utility module
This fixes a regression introduced by 0dd425da1.
2016-08-08 12:14:06 -07:00
Andrew Schwartzmeyer 5bc34eb63c Run Trace-Command tests on CI 2016-08-08 12:11:51 -07:00
Andrew Schwartzmeyer 9d164ea972 Move Unix class under Platform
E.g. SMA.Platform.Unix, not just SMA.Unix.
2016-08-08 10:48:59 -07:00
Andrew Schwartzmeyer a8416d7b30 Consolidate GetUserName code
Once .NET Core 1.1 becomes available, we can likely remove the entirety
of CorePsExtensions.cs.
2016-08-08 10:48:59 -07:00
Andrew Schwartzmeyer 3f9889d6da Consolidate InternalGetFolderPath
This logic belongs in one place, not split in two.
2016-08-05 15:34:52 -07:00
Andrew Schwartzmeyer 816dac0a55 Do not throw when getting Unix domain or user name
If the attempt to get the name fails, throwing an exception results in
PowerShell crashing. Instead, we should simply return empty data.

"unknown" is specifically not returned because it would be ambiguous; it
is not impossible to have an actual user or domain named "unknown".
2016-08-05 15:34:43 -07:00
Andrew Schwartzmeyer 09e1683098 Add Ubuntu 16.04 RID 2016-08-05 10:09:40 -07:00
Andrew Schwartzmeyer d3e5ff9ba8 Set merge=union for changelog
This will prevent the vast majority of conflicts with this file being
updated concurrently.
2016-08-04 14:57:13 -07:00
Andrew Schwartzmeyer a3a149ae5d Import Git tags to changelog 2016-08-04 14:41:55 -07:00
Andrew Schwartzmeyer 5f396629f7 Use Ruby 2.2.1 explicitly on Travis CI OS X 2016-08-04 13:52:31 -07:00
Andrew Schwartzmeyer 3143ccf97c Use default Ruby on OS X 2016-08-04 13:52:30 -07:00
Andrew Schwartzmeyer 120cc61a07 Downgrade to Xcode 7.3 2016-08-04 13:52:26 -07:00
Andrew Schwartzmeyer e936a7cd04 Remove Travis CI cache
It is unbearably slow on OS X.
2016-08-04 11:39:15 -07:00
Andrew Schwartzmeyer 39faa3dd25 Fix OS X OpenSSL link for .NET Core
Due to https://github.com/Homebrew/brew/pull/597,
.NET Core's installation instructions of `brew link --force openssl` are
now invalid (for good reasons, due to security holes). Until .NET Core
updates their libraries to find the OpenSSL libraries correctly, we can
update them as part of `Start-PSBootstrap`.

See https://github.com/dotnet/cli/issues/3964
2016-08-04 11:21:48 -07:00
Andrew Schwartzmeyer 5800b86a23 Revert "Temporarily disable OS X builds on Travis CI"
This reverts commit fef3871be2.
2016-08-04 11:03:54 -07:00
Andrew Schwartzmeyer fef3871be2 Temporarily disable OS X builds on Travis CI
OS X is failing due to home brew's OpenSSL package changes. Until we've
resolved .NET Core's use of the libraries, we need to disable the build.
2016-08-04 10:09:44 -07:00
Andrew Schwartzmeyer f866f8b06f Fix inconsistent braces and whitespace in build.psm1 2016-08-03 13:36:13 -07:00
Andrew Schwartzmeyer c35c9e5ef2 Fix libclrjit name for OS X
It's a dylib, not a so.
2016-08-03 13:36:13 -07:00
Andrew Schwartzmeyer 9c205c6158 Fix crossgen search for Ubuntu/CentOS 2016-08-03 13:13:14 -07:00
Andrew Schwartzmeyer 9cc6673b27 Add regression tests for custom key bindings
Also tests capitalized key bindings, hence the need to compare case
sensitively.
2016-07-28 22:41:04 -07:00
Andrew Schwartzmeyer 59624e9b2f Fix comparison for default ConsoleKey 2016-07-28 21:51:03 -07:00
Andrew Schwartzmeyer 554ef0b780 Use GetCharFromConsoleKey on Windows
Due to virtual key codes on Windows, simple chords like Ctrl+] are not
recognized as such. Instead, the ConsoleKey is Oem6, and the KeyChar is
an control code.
2016-07-28 21:51:02 -07:00
Andrew Schwartzmeyer d5b339fb5d Revert changes made to GetGestureString
Given the use of key.KeyChar, the original implementation is now
portable.
2016-07-28 21:35:19 -07:00
Andrew Schwartzmeyer 1facd95f1e Implement TryParseCharLiteral for Linux 2016-07-28 21:35:19 -07:00
Andrew Schwartzmeyer 75b086402a Remove GetCharFromConsoleKey
The ConsoleKey enum does not necessarily cover all possible chars.
Moreover, the times we need to obtain this info, we already have it.
2016-07-28 21:35:19 -07:00
Andrew Schwartzmeyer ba6b9663fb Move build badges
* Remove superfluous link to releases page
* Remove superfluous link to docs/build
* Add column back for install instructions
* Add extra link to the FAQ
2016-07-28 15:09:14 -07:00
Andrew Schwartzmeyer ba5bcbc8f3 Update releasing documentation 2016-07-28 14:40:34 -07:00
Andrew Schwartzmeyer 6e44b52c92 Update contributing guidelines
* Links fixed.
* Link to maintainers removed; superfluous in this document.
* TODO added to changelog.
  (I don't like this but was hesitant to remove it).
* Periods and spelling fixed.
2016-07-28 14:40:34 -07:00
Andrew Schwartzmeyer f63da502e1 Make 101.md the tree's README.md 2016-07-28 11:15:42 -07:00
Andrew Schwartzmeyer a5d655c998 Consolidate releasing and maintainers docs 2016-07-28 11:15:42 -07:00
Andrew Schwartzmeyer 1dc788897f Make maintainers.md the tree's README.md 2016-07-28 11:15:42 -07:00
Andrew Schwartzmeyer 886dea5cb5 Rewrite README 2016-07-28 11:15:42 -07:00
Andrew Schwartzmeyer 32b7d8cb99 Make learning-powershell.md the tree's README.md 2016-07-28 11:15:42 -07:00
Andrew Schwartzmeyer 9ffebab803 Fix learning-powershell path
There was a random capital S.
2016-07-28 11:15:42 -07:00
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