Revert "Merge pull request #1458 from PowerShell/psedition_rename"

This reverts commit 042d1e99bb, reversing
changes made to 105bf9c9ff.
This commit is contained in:
Manikyam Bavandla
2016-08-03 15:53:31 -07:00
parent 31cd2728ca
commit eacfd9418c
8 changed files with 14 additions and 15 deletions
@@ -464,7 +464,7 @@ function GetResolvedPathHelper
function Add-CompressionAssemblies {
if ($PSEdition -eq "WindowsPowerShell")
if ($PSEdition -eq "Desktop")
{
Add-Type -AssemblyName System.IO.Compression
Add-Type -AssemblyName System.IO.Compression.FileSystem
@@ -587,7 +587,7 @@ function ConvertFrom-SddlString
Begin
{
# On CoreCLR CryptoKeyRights and ActiveDirectoryRights are not supported.
if ($PSEdition -eq "PowerShellCore" -and ($Type -eq "CryptoKeyRights" -or $Type -eq "ActiveDirectoryRights"))
if ($PSEdition -eq "Core" -and ($Type -eq "CryptoKeyRights" -or $Type -eq "ActiveDirectoryRights"))
{
$errorId = "TypeNotSupported"
$errorCategory = [System.Management.Automation.ErrorCategory]::InvalidArgument
@@ -622,7 +622,7 @@ function ConvertFrom-SddlString
{
param($AccessMask, $Type)
if ($PSEdition -eq "PowerShellCore")
if ($PSEdition -eq "Core")
{
## All the types of access rights understood by .NET Core
$rightTypes = [Ordered] @{
@@ -12545,7 +12545,7 @@ function Update-ModuleManifest
$ProcessorArchitecture,
[Parameter()]
[ValidateSet('WindowsPowerShell','PowerShellCore')]
[ValidateSet('Desktop','Core')]
[string[]]
$CompatiblePSEditions,
@@ -14147,8 +14147,6 @@ function Test-MicrosoftCertificate
$AuthenticodeSignature
)
$result = $false
if($AuthenticodeSignature.SignerCertificate)
{
try
@@ -14162,11 +14160,10 @@ function Test-MicrosoftCertificate
}
$SafeX509ChainHandle = [Microsoft.PowerShell.Commands.PowerShellGet.Win32Helpers]::CertDuplicateCertificateChain($X509Chain.ChainContext)
$result = [Microsoft.PowerShell.Commands.PowerShellGet.Win32Helpers]::IsMicrosoftCertificate($SafeX509ChainHandle)
$SafeX509ChainHandle.Close()
return [Microsoft.PowerShell.Commands.PowerShellGet.Win32Helpers]::IsMicrosoftCertificate($SafeX509ChainHandle)
}
return $result
return $false
}
function Test-ValidManifestModule
@@ -433,7 +433,7 @@ namespace Microsoft.PowerShell.Diagnostics
"@
if ($psedition.ToLower() -eq "powershellcore")
if ($psedition.ToLower() -eq "core")
{
# Currently we only support these cmdlets as logman.exe is not working on Nano/Lot system.
Export-ModuleMember Enable-PSTrace, Disable-PSTrace, Get-LogProperties, Set-LogProperties
@@ -386,7 +386,7 @@ namespace Microsoft.PowerShell.Commands
/// </summary>
[Parameter]
[AllowEmptyCollection]
[ValidateSet("WindowsPowerShell", "PowerShellCore")]
[ValidateSet("Desktop", "Core")]
[SuppressMessage("Microsoft.Performance",
"CA1819:PropertiesShouldNotReturnArrays", Justification = "Cmdlets use arrays for parameters.")]
public string[] CompatiblePSEditions
@@ -50,9 +50,11 @@ namespace System.Management.Automation
/// Linux -- All PS on Linux flavors. This may need to be subdivided based on compatibility between distros.
/// </remarks>
#if !CORECLR
internal const string PSEditionValue = "WindowsPowerShell";
internal const string PSEditionValue = "Desktop";
#elif LINUX
internal const string PSEditionValue = "Linux";
#else
internal const string PSEditionValue = "PowerShellCore";
internal const string PSEditionValue = "Core";
#endif
// Static Constructor.
@@ -71,7 +71,7 @@ namespace System.Management.Automation
/// <summary>
/// Allowed PowerShell Editions
/// </summary>
internal static string[] AllowedEditionValues = { "WindowsPowerShell", "PowerShellCore" };
internal static string[] AllowedEditionValues = { "Desktop", "Core" };
/// <summary>
/// helper fn to check byte[] arg for null.
@@ -20,6 +20,6 @@ Describe "PSVersionTable" -Tags "CI" {
}
It "Should have the correct edition" -Skip:(!$IsCoreCLR) {
$PSVersionTable["PSEdition"] | Should Be "PowerShellCore"
$PSVersionTable["PSEdition"] | Should Be "Core"
}
}