From 217d371b0511bbe3be64189f5b457b8f443feb35 Mon Sep 17 00:00:00 2001 From: Amber Erickson Date: Mon, 1 Aug 2022 11:57:28 -0700 Subject: [PATCH] Change "IncludeXML" to "IncludeXml" --- help/Save-PSResource.md | 8 ++++---- help/en-US/PowerShellGet.dll-Help.xml | 6 +++--- src/code/InstallHelper.cs | 12 ++++++------ src/code/InstallPSResource.cs | 2 +- src/code/SavePSResource.cs | 4 ++-- src/code/UpdatePSResource.cs | 2 +- test/SavePSResource.Tests.ps1 | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/help/Save-PSResource.md b/help/Save-PSResource.md index d8c1e30e3..0d80b2298 100644 --- a/help/Save-PSResource.md +++ b/help/Save-PSResource.md @@ -15,13 +15,13 @@ Saves resources (modules and scripts) from a registered repository onto the mach ### NameParameterSet ``` Save-PSResource [-Name] [-Version ] [-Prerelease] [-Repository ] - [-Credential ] [-AsNupkg] [-IncludeXML] [-Path ] [-TrustRepository] [-SkipDependencyCheck] [-AuthenticodeCheck] [-PassThru] [-Quiet] [-WhatIf] [-Confirm] [] + [-Credential ] [-AsNupkg] [-IncludeXml] [-Path ] [-TrustRepository] [-SkipDependencyCheck] [-AuthenticodeCheck] [-PassThru] [-Quiet] [-WhatIf] [-Confirm] [] ``` ### InputObjectParameterSet ``` Save-PSResource [-InputObject] [-Credential ] [-AsNupkg] - [-IncludeXML] [-Path ] [-TrustRepository] [-SkipDependencyCheck] [-PassThru] [-Quiet] [-WhatIf] [-Confirm] [] + [-IncludeXml] [-Path ] [-TrustRepository] [-SkipDependencyCheck] [-PassThru] [-Quiet] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -50,7 +50,7 @@ Saves the Az module as a .nupkg file ### Example 4 ```powershell -PS C:\> Save-PSResource Az -IncludeXML +PS C:\> Save-PSResource Az -IncludeXml ``` Saves the Az module and includes the PowerShellGet XML metadata @@ -155,7 +155,7 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -IncludeXML +### -IncludeXml Includes the PowerShellGet metadata XML (used to verify that PowerShellGet has installed a module). ```yaml diff --git a/help/en-US/PowerShellGet.dll-Help.xml b/help/en-US/PowerShellGet.dll-Help.xml index 6eb948e70..f251ef402 100644 --- a/help/en-US/PowerShellGet.dll-Help.xml +++ b/help/en-US/PowerShellGet.dll-Help.xml @@ -2406,7 +2406,7 @@ PS C:\> Get-PSResourceRepository False - IncludeXML + IncludeXml Includes the PowerShellGet metadata XML (used to verify that PowerShellGet has installed a module). @@ -2594,7 +2594,7 @@ PS C:\> Get-PSResourceRepository False - IncludeXML + IncludeXml Includes the PowerShellGet metadata XML (used to verify that PowerShellGet has installed a module). @@ -2745,7 +2745,7 @@ PS C:\> Get-PSResourceRepository -------------------------- Example 4 -------------------------- - PS C:\> Save-PSResource Az -IncludeXML + PS C:\> Save-PSResource Az -IncludeXml Saves the Az module and includes the PowerShellGet XML metadata diff --git a/src/code/InstallHelper.cs b/src/code/InstallHelper.cs index d1b4962bb..ce017ada1 100644 --- a/src/code/InstallHelper.cs +++ b/src/code/InstallHelper.cs @@ -47,7 +47,7 @@ internal class InstallHelper : PSCmdlet private bool _trustRepository; private PSCredential _credential; private bool _asNupkg; - private bool _includeXML; + private bool _includeXml; private bool _noClobber; private bool _authenticodeCheck; private bool _savePkg; @@ -78,14 +78,14 @@ public List InstallPackages( bool noClobber, PSCredential credential, bool asNupkg, - bool includeXML, + bool includeXml, bool skipDependencyCheck, bool authenticodeCheck, bool savePkg, List pathsToInstallPkg) { _cmdletPassedIn.WriteVerbose(string.Format("Parameters passed in >>> Name: '{0}'; Version: '{1}'; Prerelease: '{2}'; Repository: '{3}'; " + - "AcceptLicense: '{4}'; Quiet: '{5}'; Reinstall: '{6}'; TrustRepository: '{7}'; NoClobber: '{8}'; AsNupkg: '{9}'; IncludeXML '{10}'; SavePackage '{11}'", + "AcceptLicense: '{4}'; Quiet: '{5}'; Reinstall: '{6}'; TrustRepository: '{7}'; NoClobber: '{8}'; AsNupkg: '{9}'; IncludeXml '{10}'; SavePackage '{11}'", string.Join(",", names), versionRange != null ? (versionRange.OriginalString != null ? versionRange.OriginalString : string.Empty) : string.Empty, prerelease.ToString(), @@ -96,7 +96,7 @@ public List InstallPackages( trustRepository.ToString(), noClobber.ToString(), asNupkg.ToString(), - includeXML.ToString(), + includeXml.ToString(), savePkg.ToString())); _versionRange = versionRange; @@ -110,7 +110,7 @@ public List InstallPackages( _noClobber = noClobber; _credential = credential; _asNupkg = asNupkg; - _includeXML = includeXML; + _includeXml = includeXml; _savePkg = savePkg; _pathsToInstallPkg = pathsToInstallPkg; @@ -557,7 +557,7 @@ private List InstallPackage( // Delete the extra nupkg related files that are not needed and not part of the module/script DeleteExtraneousFiles(pkgIdentity, tempDirNameVersion); - if (_includeXML) + if (_includeXml) { CreateMetadataXMLFile(tempDirNameVersion, installPath, pkg, isModule); } diff --git a/src/code/InstallPSResource.cs b/src/code/InstallPSResource.cs index cb9bb3510..4149a2ba5 100644 --- a/src/code/InstallPSResource.cs +++ b/src/code/InstallPSResource.cs @@ -524,7 +524,7 @@ private void ProcessInstallHelper(string[] pkgNames, VersionRange pkgVersion, bo noClobber: NoClobber, credential: pkgCredential, asNupkg: false, - includeXML: true, + includeXml: true, skipDependencyCheck: SkipDependencyCheck, authenticodeCheck: AuthenticodeCheck, savePkg: false, diff --git a/src/code/SavePSResource.cs b/src/code/SavePSResource.cs index 73b6d1c19..2fa8f0480 100644 --- a/src/code/SavePSResource.cs +++ b/src/code/SavePSResource.cs @@ -76,7 +76,7 @@ public sealed class SavePSResource : PSCmdlet /// Saves the metadata XML file with the resource /// [Parameter] - public SwitchParameter IncludeXML { get; set; } + public SwitchParameter IncludeXml { get; set; } /// /// The destination where the resource is to be installed. Works for all resource types. @@ -264,7 +264,7 @@ private void ProcessSaveHelper(string[] pkgNames, bool pkgPrerelease, string[] p credential: Credential, noClobber: false, asNupkg: AsNupkg, - includeXML: IncludeXML, + includeXml: IncludeXml, skipDependencyCheck: SkipDependencyCheck, authenticodeCheck: AuthenticodeCheck, savePkg: true, diff --git a/src/code/UpdatePSResource.cs b/src/code/UpdatePSResource.cs index 5ca79d529..bce9ed295 100644 --- a/src/code/UpdatePSResource.cs +++ b/src/code/UpdatePSResource.cs @@ -183,7 +183,7 @@ protected override void ProcessRecord() credential: Credential, noClobber: false, asNupkg: false, - includeXML: true, + includeXml: true, skipDependencyCheck: SkipDependencyCheck, authenticodeCheck: AuthenticodeCheck, savePkg: false, diff --git a/test/SavePSResource.Tests.ps1 b/test/SavePSResource.Tests.ps1 index b9ddac47d..2d5e2e27f 100644 --- a/test/SavePSResource.Tests.ps1 +++ b/test/SavePSResource.Tests.ps1 @@ -217,7 +217,7 @@ Describe 'Test Save-PSResource for PSResources' { } It "Save module and include XML metadata file" { - Save-PSResource -Name $testModuleName -Version "1.0.0" -Repository $PSGalleryName -Path $SaveDir -IncludeXML -TrustRepository + Save-PSResource -Name $testModuleName -Version "1.0.0" -Repository $PSGalleryName -Path $SaveDir -IncludeXml -TrustRepository $pkgDir = Get-ChildItem -Path $SaveDir | Where-Object Name -eq $testModuleName $pkgDir | Should -Not -BeNullOrEmpty $pkgDirVersion = Get-ChildItem -Path $pkgDir.FullName