Skip to content

Commit

Permalink
Only do WSL update command on windows-2022 runner image hosted by GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
Vampire committed Feb 27, 2025
1 parent a87a88e commit f4cd646
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ suspend fun installDistribution() {
wslArguments = arrayOf("--set-default-version", "${wslVersion()}")
)

if (wslVersion() != 1u) {
if ((wslVersion() != 1u) && (process.env["ImageOS"] == "win22") && (process.env["RUNNER_ENVIRONMENT"] == "github-hosted")) {
retry(10) {
executeWslCommand(
wslArguments = arrayOf("--update")
Expand Down

0 comments on commit f4cd646

Please sign in to comment.