We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4054bf1 commit 5c39669Copy full SHA for 5c39669
1 file changed
main.go
@@ -107,9 +107,11 @@ func validateSubscription() {
107
fmt.Println("Timeout or API not reachable. Continuing to next step.")
108
return
109
}
110
- defer resp.Body.Close()
111
112
- if resp.StatusCode == http.StatusForbidden {
+ statusCode := resp.StatusCode
+ resp.Body.Close()
113
+
114
+ if statusCode == http.StatusForbidden {
115
fmt.Printf("::error::\x1b[1;31mThis action requires a StepSecurity subscription for private repositories.\x1b[0m\n")
116
fmt.Printf("::error::\x1b[31mLearn how to enable a subscription: %s\x1b[0m\n", docsURL)
117
os.Exit(1)
0 commit comments