Skip to content

Commit 15c1585

Browse files
Update script to support running on GH action (#41581)
Co-authored-by: Praveen Kuttappan <[email protected]>
1 parent 44eb93b commit 15c1585

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

eng/common/mcp/azure-sdk-mcp.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ param(
44
[string]$FileName = 'Azure.Sdk.Tools.Cli',
55
[string]$Package = 'azsdk',
66
[string]$Version, # Default to latest
7-
[string]$InstallDirectory = (Join-Path $HOME ".azure-sdk-mcp" "azsdk"),
7+
[string]$InstallDirectory = '',
88
[string]$Repository = 'Azure/azure-sdk-tools',
99
[string]$RunDirectory = (Resolve-Path (Join-Path $PSScriptRoot .. .. ..)),
1010
[switch]$Run,
@@ -14,6 +14,11 @@ param(
1414

1515
$ErrorActionPreference = "Stop"
1616

17+
if (-not $InstallDirectory)
18+
{
19+
$homeDir = if ($env:HOME) { $env:HOME } else { $env:USERPROFILE }
20+
$InstallDirectory = (Join-Path $homeDir ".azure-sdk-mcp" "azsdk")
21+
}
1722
. (Join-Path $PSScriptRoot '..' 'scripts' 'Helpers' 'AzSdkTool-Helpers.ps1')
1823

1924
if ($Clean) {

0 commit comments

Comments
 (0)