move all return statements to exit 0
This commit is contained in:
parent
e68a49e1d5
commit
f0cc32e1ee
2 changed files with 6 additions and 4 deletions
5
scripts/obtain/dotnet-install.ps1
vendored
5
scripts/obtain/dotnet-install.ps1
vendored
|
@ -307,7 +307,7 @@ if ($DryRun) {
|
||||||
Say "- $DownloadLink"
|
Say "- $DownloadLink"
|
||||||
}
|
}
|
||||||
Say "Repeatable invocation: .\$($MyInvocation.MyCommand) -Version $SpecificVersion -Channel $Channel -Architecture $CLIArchitecture -InstallDir $InstallDir"
|
Say "Repeatable invocation: .\$($MyInvocation.MyCommand) -Version $SpecificVersion -Channel $Channel -Architecture $CLIArchitecture -InstallDir $InstallDir"
|
||||||
return
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
$InstallRoot = Resolve-Installation-Path $InstallDir
|
$InstallRoot = Resolve-Installation-Path $InstallDir
|
||||||
|
@ -317,7 +317,7 @@ $IsSdkInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -Relativ
|
||||||
Say-Verbose ".NET SDK installed? $IsSdkInstalled"
|
Say-Verbose ".NET SDK installed? $IsSdkInstalled"
|
||||||
if ($IsSdkInstalled) {
|
if ($IsSdkInstalled) {
|
||||||
Say ".NET SDK version $SpecificVersion is already installed."
|
Say ".NET SDK version $SpecificVersion is already installed."
|
||||||
return
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null
|
New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null
|
||||||
|
@ -343,3 +343,4 @@ else {
|
||||||
}
|
}
|
||||||
|
|
||||||
Say "Installation finished"
|
Say "Installation finished"
|
||||||
|
exit 0
|
||||||
|
|
|
@ -307,7 +307,7 @@ if ($DryRun) {
|
||||||
Say "- $DownloadLink"
|
Say "- $DownloadLink"
|
||||||
}
|
}
|
||||||
Say "Repeatable invocation: .\$($MyInvocation.MyCommand) -Version $SpecificVersion -Channel $Channel -Architecture $CLIArchitecture -InstallDir $InstallDir"
|
Say "Repeatable invocation: .\$($MyInvocation.MyCommand) -Version $SpecificVersion -Channel $Channel -Architecture $CLIArchitecture -InstallDir $InstallDir"
|
||||||
return
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
$InstallRoot = Resolve-Installation-Path $InstallDir
|
$InstallRoot = Resolve-Installation-Path $InstallDir
|
||||||
|
@ -317,7 +317,7 @@ $IsSdkInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -Relativ
|
||||||
Say-Verbose ".NET SDK installed? $IsSdkInstalled"
|
Say-Verbose ".NET SDK installed? $IsSdkInstalled"
|
||||||
if ($IsSdkInstalled) {
|
if ($IsSdkInstalled) {
|
||||||
Say ".NET SDK version $SpecificVersion is already installed."
|
Say ".NET SDK version $SpecificVersion is already installed."
|
||||||
return
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null
|
New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null
|
||||||
|
@ -343,3 +343,4 @@ else {
|
||||||
}
|
}
|
||||||
|
|
||||||
Say "Installation finished"
|
Say "Installation finished"
|
||||||
|
exit 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue