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 {
210
210
}
211
211
212
212
override suspend fun update () {
213
- refresh()
213
+ update(true )
214
+ }
215
+
216
+ protected suspend fun update (refresh : Boolean ) {
217
+ if (refresh) {
218
+ refresh()
219
+ }
214
220
exec(
215
221
commandLine = " wsl" ,
216
222
args = arrayOf(
@@ -302,7 +308,14 @@ object Debian : AptGetBasedDistribution(
302
308
version = SemVer ("1.0.0"),
303
309
downloadUrl = URL ("https://aka.ms/wsl-debian-gnulinux"),
304
310
installerFile = " debian.exe"
305
- )
311
+ ) {
312
+ override suspend fun update () {
313
+ refresh()
314
+ retry(5 ) {
315
+ update(false )
316
+ }
317
+ }
318
+ }
306
319
307
320
object Kali : AptGetBasedDistribution(
308
321
wslId = " MyDistribution" ,
You can’t perform that action at this time.
0 commit comments