Skip to content

Commit faec4cd

Browse files
committed
Add Check for CLI
1 parent 541cc20 commit faec4cd

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Automation/Generate-ParameterCommand.ps1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ param(
3131
$NEW_LINE = "`r`n";
3232
. "$PSScriptRoot\StringProcessingHelper.ps1";
3333

34-
function Generate-ParameterCommandImpl
34+
function Generate-CliParameterCommandImpl
3535
{
3636
param(
3737
[Parameter(Mandatory = $true)]
@@ -324,11 +324,14 @@ function Generate-ParameterCommandImpl
324324
{
325325
if ($null -ne $subNode)
326326
{
327-
$code += Generate-ParameterCommandImpl $subNode;
327+
$code += Generate-CliParameterCommandImpl $subNode;
328328
}
329329
}
330330

331331
return $code;
332332
}
333333

334-
Write-Output (Generate-ParameterCommandImpl $CmdletTreeNode);
334+
if ($ToolType -eq 'CLI')
335+
{
336+
Write-Output (Generate-CliParameterCommandImpl $CmdletTreeNode);
337+
}

0 commit comments

Comments
 (0)