File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -25,15 +25,13 @@ if ($Env:YARN_VERSION) {
25
25
$latest_version = [String ](Invoke-WebRequest - Uri https:// yarnpkg.com / latest- version - UseBasicParsing)
26
26
}
27
27
28
- $latest_chocolatey_version = ( Find-Package - Name Yarn).Version
29
-
30
- if ([ Version ] $latest_chocolatey_version -ge [ Version ] $latest_version ) {
31
- Write-Output ( ' Current version ({0}) is the latest ' -f $latest_chocolatey_version )
28
+ Write-Output " Checking if $latest_version is already on Chocolatey... "
29
+ $choco_output = choco list yarn -- exact -- version $latest_version | Out-String
30
+ if ($choco_output -notmatch ' 0 packages found ' ) {
31
+ Write-Output ' Already on Chocolatey. Nothing to do! '
32
32
Exit
33
33
}
34
34
35
- Write-Output (' Latest version is {0}, version on Chocolatey is {1}. Updating...' -f $latest_version , $latest_chocolatey_version )
36
-
37
35
if (-Not (Test-Path artifacts)) {
38
36
mkdir artifacts
39
37
}
You can’t perform that action at this time.
0 commit comments