Skip to content

Commit

Permalink
Only write suggested commands if they were logged
Browse files Browse the repository at this point in the history
  • Loading branch information
jessehouwing committed Nov 13, 2023
1 parent c4c538e commit fccb898
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,10 @@ if ($latest -and($latest.sha -ne $highestVersion.sha))
$suggestedCommands += "git push origin $($highestVersion.sha):latest --force`n"
}


Write-Output $suggestedCommands
write-output "### Suggested fix:`n```````n$suggestedCommands`n``````" >> $env:GITHUB_STEP_SUMMARY
if ($suggestedCommands -ne "")
{
Write-Output $suggestedCommands
write-output "### Suggested fix:`n```````n$suggestedCommands`n``````" >> $env:GITHUB_STEP_SUMMARY
}

exit $global:returnCode

0 comments on commit fccb898

Please sign in to comment.