From a079c63af548e0c6778149b2d8b0f940fe8a3d16 Mon Sep 17 00:00:00 2001 From: PRASOON KARUNAN V <12897753+kvprasoon@users.noreply.github.com> Date: Mon, 13 Jul 2020 11:18:45 +0530 Subject: [PATCH] Make other switches mandatory in Split-Path (#13150) --- .../commands/management/ParsePathCommand.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/ParsePathCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/ParsePathCommand.cs index 5e0711e55..a1dd7895f 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/ParsePathCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/ParsePathCommand.cs @@ -107,7 +107,7 @@ namespace Microsoft.PowerShell.Commands /// The qualifier is the drive or provider that is qualifying /// the MSH path. /// - [Parameter(ValueFromPipelineByPropertyName = true, ParameterSetName = qualifierSet)] + [Parameter(ParameterSetName = qualifierSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] public SwitchParameter Qualifier { get; set; } /// @@ -118,7 +118,7 @@ namespace Microsoft.PowerShell.Commands /// The qualifier is the drive or provider that is qualifying /// the MSH path. /// - [Parameter(ParameterSetName = noQualifierSet, Mandatory = false, ValueFromPipelineByPropertyName = true)] + [Parameter(ParameterSetName = noQualifierSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] public SwitchParameter NoQualifier { get; set; } /// @@ -136,7 +136,7 @@ namespace Microsoft.PowerShell.Commands /// /// If true the leaf name of the path will be returned. /// - [Parameter(ParameterSetName = leafSet, Mandatory = false, ValueFromPipelineByPropertyName = true)] + [Parameter(ParameterSetName = leafSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] public SwitchParameter Leaf { get; set; } /// @@ -145,7 +145,7 @@ namespace Microsoft.PowerShell.Commands /// /// If true the leaf base name of the path will be returned. /// - [Parameter(ParameterSetName = leafBaseSet, Mandatory = false, ValueFromPipelineByPropertyName = true)] + [Parameter(ParameterSetName = leafBaseSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] public SwitchParameter LeafBase { get; set; } /// @@ -154,7 +154,7 @@ namespace Microsoft.PowerShell.Commands /// /// If true the extension of the path will be returned. /// - [Parameter(ParameterSetName = extensionSet, Mandatory = false, ValueFromPipelineByPropertyName = true)] + [Parameter(ParameterSetName = extensionSet, Mandatory = true, ValueFromPipelineByPropertyName = true)] public SwitchParameter Extension { get; set; } /// @@ -167,7 +167,7 @@ namespace Microsoft.PowerShell.Commands /// /// Determines if the path is an absolute path. /// - [Parameter(ParameterSetName = isAbsoluteSet)] + [Parameter(ParameterSetName = isAbsoluteSet, Mandatory = true)] public SwitchParameter IsAbsolute { get; set; } #endregion Parameters