Skip to content

Commit 663ead2

Browse files
authored
Add -NoPath support to both InstallDotNetSdk and InstallDotNet functions; needed for users who directly invoke these commands repeatedly in test work items (#6092)
1 parent e11b848 commit 663ead2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

eng/common/tools.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
240240
return $installScript
241241
}
242242

243-
function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = '') {
244-
InstallDotNet $dotnetRoot $version $architecture '' $false $runtimeSourceFeed $runtimeSourceFeedKey
243+
function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = '', [switch] $noPath) {
244+
InstallDotNet $dotnetRoot $version $architecture '' $false $runtimeSourceFeed $runtimeSourceFeedKey -noPath:$noPath
245245
}
246246

247247
function InstallDotNet([string] $dotnetRoot,
@@ -250,7 +250,8 @@ function InstallDotNet([string] $dotnetRoot,
250250
[string] $runtime = '',
251251
[bool] $skipNonVersionedFiles = $false,
252252
[string] $runtimeSourceFeed = '',
253-
[string] $runtimeSourceFeedKey = '') {
253+
[string] $runtimeSourceFeedKey = '',
254+
[switch] $noPath) {
254255

255256
$installScript = GetDotNetInstallScript $dotnetRoot
256257
$installParameters = @{
@@ -261,6 +262,7 @@ function InstallDotNet([string] $dotnetRoot,
261262
if ($architecture) { $installParameters.Architecture = $architecture }
262263
if ($runtime) { $installParameters.Runtime = $runtime }
263264
if ($skipNonVersionedFiles) { $installParameters.SkipNonVersionedFiles = $skipNonVersionedFiles }
265+
if ($noPath) { $installParameters.NoPath = $True }
264266

265267
try {
266268
& $installScript @installParameters

0 commit comments

Comments
 (0)