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
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