From 37f79aef12237a22cad5dc2e3ea21c216b415c8c Mon Sep 17 00:00:00 2001 From: Sebastian Fudalej Date: Mon, 6 Nov 2023 13:02:41 +0100 Subject: [PATCH] fix: proper error when default distro is not found --- cmd/wsl2host/pkg/service/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/wsl2host/pkg/service/service.go b/cmd/wsl2host/pkg/service/service.go index 0d15297..c93a211 100644 --- a/cmd/wsl2host/pkg/service/service.go +++ b/cmd/wsl2host/pkg/service/service.go @@ -100,7 +100,7 @@ func updateHostIP(elog debug.Log, distros []*wslapi.DistroInfo) error { } // process aliases - defdistro, _ := wslapi.GetDefaultDistro() + defdistro, err := wslapi.GetDefaultDistro() if err != nil { elog.Error(1, fmt.Sprintf("GetDefaultDistro failed: %v", err)) return fmt.Errorf("GetDefaultDistro failed: %w", err)