Commit graph

4803 commits

Author SHA1 Message Date
Dongbo Wang e8a0f3ca63 Fix web cmdlet tests and the error message for 'Get-Member -input $null' (#3602) 2017-04-19 18:20:45 -07:00
Dongbo Wang 1c1c75318e Add 'x' permission to crossgen on Linux and OSX (#3592) 2017-04-18 16:51:18 -07:00
Chunqing Chen e3d4c95a77 New-Item -ItemType SymbolicLink cannot understand directory path ending with slash on Linux (#2974) 2017-04-18 15:40:25 -07:00
Dongbo Wang 79a1f80309 Update build script to always use 'dotnet publish' (#3589)
Also update 2 building docs
2017-04-18 13:12:35 -07:00
Dongbo Wang 7a55bf98b2 Move powershell to .NET Core 2.0 (#3556)
This change moves powershell to .NET Core 2.0. Major changes are:
1. PowerShell assemblies are now targeting `netcoreapp2.0`. We are using `microsoft.netcore.app-2.0.0-preview1-001913-00`, which is from dotnet-core build 4/4/17. We cannot target `netstandard2.0` because the packages `System.Reflection.Emit` and `System.Reflection.Emit.Lightweight`, which are needed for powershell class, cannot be referenced when targeting `netstandard2.0`.
2. Refactor code to remove most CLR stub types and extension types.
3. Update build scripts to enable CI builds. The `-cache` section is specified to depend on `appveyor.yml`, so the cache will be invalidated if `appveyor.yml` is changed.
4. Ship `netcoreapp` reference assemblies with powershell to fix the issues in `Add-Type` (#2764). By default `Add-Type` will reference all those reference assemblies when compiling C# code. If `-ReferenceAssembly` is specified, then we search reference assemblies first, then the framework runtime assemblies, and lastly the loaded assemblies (possibly a third-party one that was already loaded).
5. `dotnet publish` generates executable on Unix platforms, but doesn't set "x" permission and thus it cannot execute. Currently, the "x" permission is set in the build script, `dotnet/cli` issue [#6286](https://github.com/dotnet/cli/issues/6286) is tracking this.
6. Replace the use of some APIs with the ones that take `SecureString`.
7. osx.10.12 is required to update to `netcoreapp2.0` because `dotnet-cli` 2.0.0-preview only works on osx.10.12.
8. Add dependency to `System.ValueTuple` to work around a ambiguous type identity issue in coreclr. The issue is tracked by `dotnet/corefx` [#17797](https://github.com/dotnet/corefx/issues/17797). When moving to newer version of `netcoreapp2.0`, we need to verify if this dependency is still needed.
2017-04-17 11:52:38 -07:00
jeffbi 06020f34e5 Fix New-Item to create correct symlink type (#2915) (#3509)
Now `New-Item` can create a file symlink to a file target or to a non-existent target. It can also create a directory symlink to a directory target on Windows.
2017-04-14 14:23:14 -07:00
Steve Lee 2851f7e800 Accept -i for an interactive shell (#3558)
On Unix, it is a convention for shells to accept `-i` for an interactive shell and many
tools expect this behavior (`script` for example, and when setting powershell as the
default shell) and calls the shell with the `-i` switch.  This change is breaking in
that `-i` previously could be used as short hand to match `-inputformat` which now will
need to be `-in`.
2017-04-13 18:35:26 -07:00
George Chakhidze 47ec6b2a86 Use IntPtr(-1) for INVALID_HANDLE_VALUE instead of IntPtr.Zero (#3544)
- Fix incorrect handling of 'GetCurrentProcess()' API return value in 'IsWow64()' function (MainEntry.cpp)
- Remove unused INVALID_HANDLE_VALUE field from 'ProcessNativeMethods' class (Process.cs)
2017-04-13 17:00:56 -07:00
Ilya 4ad4b194fc Convert tab indentations to spaces in *.cs files (#3551)
Prepare to pass meta test.
2017-04-13 13:45:46 -07:00
Ilya acec58c049 Make the output of $PSVersionTable in alphabetical order (#3530) 2017-04-12 22:04:53 -07:00
Ilya f0c0176aa2 Typo in Format-Hex (#3539) 2017-04-12 10:43:18 -07:00
probonopd 3516872144 Use /bin/bash, fixes #3525 2017-04-12 08:57:26 -07:00
Travis Plunk 8d4db01a5d Add sudo for adding cert for OpenSUSE (#3524) 2017-04-11 13:37:53 -07:00
Travis Plunk 68bcd4b528 Removed trailing whitespace (#3485) 2017-04-11 09:44:43 -07:00
Travis Plunk 18c28f8fc7 Fix markdown lint issues for SSH Remoting demo and enable related tests (#3484) 2017-04-11 09:42:37 -07:00
Chris Dent 4697dd2b38 Adding public ValidRootDrives property to ValidateDrive (#3510) 2017-04-11 09:40:01 -07:00
Steve Lee 753b1965a0 Fix crash at startup when env:HOME not set (#3437)
There are cases like using PowerShell via Puppet where the account being
used does not have a home directory.  Updated PowerShell to use a process
specific temporary directory if HOME, CONFIG, CACHE, and DATA directories
are not available.  Temporary directory is removed when last runspace
is disposed.
2017-04-09 09:23:06 -07:00
Travis Plunk 9b3d82b7b4 Update windows docker hashes and labels (#3508) 2017-04-07 14:10:08 -07:00
Dongbo Wang 64f52edbd5 Update docs to use the new windows package names (#3507) 2017-04-07 12:03:29 -07:00
Dongbo Wang b5c1473484 Alpha.18 release doc updates (#3492) 2017-04-06 21:27:48 -07:00
Ilya 0883438e55 Fix Default/OEM encoding behavior PowerShell Core (#3467)
Based on the conclusion in discussion #3248, this PR fix "OEM" and "Default" encoding in powershell.
1. OEM -- We need an internal fix because .Net Core has no "OEM" encoding.
The fix gives the following PowerShell Core behavior on "OEM" encoding:
   - on Windows - as Windows PowerShell based on GetOEMCP() and legacy encodings (System.Text.Encoding.CodePages)
   - on Unix - the same as default encoding in PowerShell Core

2. Default -- We need internal fix because CoreFX `Encoding.default` for all platforms is UTF8.
Until we complete the `Encoding RFC` we should restore behavior as in Windows PowerShell.
The fix gives the following PowerShell Core behavior on "Default" encoding:
   - on Windows - as Windows PowerShell based on GetACP() and legacy encodings (System.Text.Encoding.CodePages)
   - on Unix - UTF-8 without BOM (We are expecting that the same will be [in CoreFX](https://github.com/dotnet/coreclr/issues/10643))
2017-04-05 18:22:18 -07:00
Travis Plunk 459b0b5f29 OpenSUSE42.1 docs update and download.sh (#3478) 2017-04-04 17:41:40 -07:00
Travis Plunk 8de8b19505 Silently don't set execution policy for Unix machines (#3481) 2017-04-04 16:53:36 -07:00
Steve Lee 2d8d59e4e0 Update SSHRemoting demo README.md (#3471) 2017-04-04 14:16:50 -07:00
Dongbo Wang 3be547c78e Skip the parser tests that are run by 'ShouldBeParseError' in Travis Full Build (#3479) 2017-04-04 09:23:51 -07:00
Dongbo Wang a79cb2ffd2 Replace 'libpsrpclient' with 'psrp' package (#3477)
The package 'libpsrpclient' was replaced by 'psrp' in #3271. However, this was missed when moving from project.json to MSBuild. This change makes this update.
2017-04-03 16:40:06 -07:00
Rune Darrud 42f2e3ca82 Fix tests to work as expected under Linux (#3474)
- Removed the -TimeoutSec option and modified the expected Error to be consistent across platforms.
- Changed the port of the phony proxy to 9 which is reserved for the Discard Protocol. So even if the system is listening, it's supposed to discard that TCP request (UDP may use it for Wake-on-Lan, but doesn't affect this).
2017-04-02 17:31:22 -07:00
PetSerAl f76b2fcbaf Make Out-Default -Transcript more robust in how it handles TranscribeOnly state (#3436) 2017-04-01 16:36:04 -07:00
Rune Darrud a770ecd686 Add option -NoProxy to WebCmdlet 2017-03-31 18:02:59 -07:00
Travis Plunk 64230566f8 Refer to Windows docker images license in main readme (#3469) 2017-03-31 12:34:01 -07:00
Steve Lee 2cfe3d57a6 Fix progress bar display when cursor not at left edge
Fix by saving the cursor position, displaying the progress, and restoring the cursor back to the original position so normal formatting (e.g. table output) can continue.

Closes #3453.
2017-03-31 11:38:01 -07:00
Ilya 544e466e15 Fix 'StringBuilder' initialization (#3458) 2017-03-31 09:31:11 -07:00
Travis Plunk 7ceb1f6b84 Add entry points to the windows docker files (#3462) 2017-03-31 09:23:47 -07:00
Travis Plunk 9efbf56dd7 fix hashes for windows docker files (#3454) 2017-03-30 08:36:13 -07:00
Ilya 46cc634854 Fix typo in Scripting.Classes.BasicParsing.Tests.ps1 (#3459) 2017-03-30 08:35:06 -07:00
Travis Plunk 7e5814abf5 Expand md lint tests (#3451) 2017-03-29 17:13:19 -07:00
Ilya c705dbd0a7 Add test to verify approved aliases list (#3380) 2017-03-29 14:53:40 -07:00
Raghu Shantha [MSFT] d2d80c6832 Use Product Semantic version in the MSI installer where possible (#3435) 2017-03-29 13:36:44 -07:00
Ilya 39be7109d4 Add tab completion for Select-Object -ExcludeProperty -ExpandProperty (#3443) 2017-03-29 10:36:18 -07:00
Ilya 27b27cc43a Autoload TestRemoting.psm1 (#3430) 2017-03-29 10:11:02 -07:00
Steve Lee 4d0e21f6d2 Add "cache-control:no-cache" and "last-modifed" to headers to prevent GitHub CDN from caching Travis nightly badge (#3449) 2017-03-28 22:15:52 -07:00
Travis Plunk 7317f6c9bc Sorted spelling dictionary for easy of management (#3446) 2017-03-28 15:58:41 -07:00
Steve Lee da2fd5c89f Get-help may return multiple instances of the same help file (#3410)
* Help was incorrectly returning multiple instances of the same help file if it existed under a culture path and the parent was in the search path as well

* updated test to use generated help file rather than an actual one

* Fixed test to have module in $pshome path and casing of en-US culture
2017-03-28 15:07:42 -07:00
Steve Lee 520d2037df Update SSHRemoting README.md (#3444) 2017-03-28 14:27:58 -07:00
Ilya b212c7a9bd Reuse ProgressRecord in Web Cmdlets (#3411) 2017-03-28 13:13:28 -07:00
Paul Higinbotham 13ec07850b Fix for job dropping runspace close error (#3445) 2017-03-28 12:22:10 -07:00
Dongbo Wang 5c6ca49da4 Rename OSX package name to include operating system information (#3440) 2017-03-27 18:27:07 -07:00
Travis Plunk 737058f62e Add markdown lint test (#3420)
* Fix markdown syntax and spelling issues
* update spelling dictionary
2017-03-27 16:44:28 -07:00
Steve Lee c0c4cf41e7 rename AppImage to include version (#3433) 2017-03-27 15:52:58 -07:00
Dongbo Wang 3826e47313 Update installing docs as we have moved to .NET Core SDK 1.0.1 (#3432) 2017-03-27 15:26:22 -07:00