Skip to content

Commit 454c48f

Browse files
committed
update fixers
1 parent 326212c commit 454c48f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

internal/pkg/panel/install.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ func CheckInstallation(ctx context.Context, host, port string, https bool) error
131131
}(response.Body)
132132

133133
if response.StatusCode != http.StatusOK {
134-
log.Println("unsuccessful response from panel")
134+
log.Println("unsuccessful response from panel, invalid status code")
135135
body, _ := io.ReadAll(response.Body)
136136
log.Println(string(body))
137137

138-
return errors.New("unsuccessful response from panel")
138+
return errors.New("unsuccessful response from panel, invalid status code")
139139
}
140140

141141
r := struct {
@@ -149,7 +149,7 @@ func CheckInstallation(ctx context.Context, host, port string, https bool) error
149149
}
150150

151151
if r.Status != "ok" {
152-
return errors.New("unsuccessful response from panel")
152+
return errors.New("unsuccessful response from panel, invalid status in response")
153153
}
154154

155155
return nil

pkg/fixer/fixer.go

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func RunFixer(ctx context.Context, checkFunc CheckFunc, items []Item) error {
2626
continue
2727
}
2828

29+
log.Println("Trying to run fix ", item.Name)
2930
err = item.FixFunc(ctx)
3031
if err != nil {
3132
return errors.WithMessagef(err, "failed to fix '%s'", item.Name)
@@ -35,6 +36,8 @@ func RunFixer(ctx context.Context, checkFunc CheckFunc, items []Item) error {
3536
if err != nil {
3637
log.Println(errors.WithMessagef(err, "failed to check after '%s' fix", item.Name))
3738
} else {
39+
log.Println("Fix applied successfully")
40+
3841
return nil
3942
}
4043
}

0 commit comments

Comments
 (0)