File tree 1 file changed +8
-2
lines changed 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ function Install-Dotnet
294
294
[CmdletBinding (SupportsShouldProcess = $true )]
295
295
param (
296
296
[Parameter ()][Switch ]$Force ,
297
- [Parameter ()]$version = $ ( Get-GlobalJsonSdkVersion )
297
+ [Parameter ()]$version = $ ( Get-GlobalJsonSdkVersion - Raw )
298
298
)
299
299
300
300
if ( Test-DotnetInstallation - requestedversion $version ) {
@@ -332,9 +332,15 @@ function Install-Dotnet
332
332
}
333
333
334
334
function Get-GlobalJsonSdkVersion {
335
+ param ( [switch ]$Raw )
335
336
$json = Get-Content - raw (Join-Path $PSScriptRoot global.json) | ConvertFrom-Json
336
337
$version = $json.sdk.Version
337
- ConvertTo-PortableVersion $version
338
+ if ( $Raw ) {
339
+ return $version
340
+ }
341
+ else {
342
+ ConvertTo-PortableVersion $version
343
+ }
338
344
}
339
345
340
346
# we don't have semantic version in earlier versions of PowerShell, so we need to
You can’t perform that action at this time.
0 commit comments