File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
src/jsMain/kotlin/net/kautler/github/action/setup_wsl Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,13 @@ abstract class AptGetBasedDistribution : Distribution {
210210 }
211211
212212 override suspend fun update () {
213- refresh()
213+ update(true )
214+ }
215+
216+ protected suspend fun update (refresh : Boolean ) {
217+ if (refresh) {
218+ refresh()
219+ }
214220 exec(
215221 commandLine = " wsl" ,
216222 args = arrayOf(
@@ -302,7 +308,14 @@ object Debian : AptGetBasedDistribution(
302308 version = SemVer ("1.0.0"),
303309 downloadUrl = URL ("https://aka.ms/wsl-debian-gnulinux"),
304310 installerFile = " debian.exe"
305- )
311+ ) {
312+ override suspend fun update () {
313+ refresh()
314+ retry(5 ) {
315+ update(false )
316+ }
317+ }
318+ }
306319
307320object Kali : AptGetBasedDistribution(
308321 wslId = " MyDistribution" ,
You can’t perform that action at this time.
0 commit comments