1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-02-04 18:21:06 +02:00

Fix startup panic (#3160)

introduced by #3129
This commit is contained in:
qwerty287 2024-01-10 13:50:49 +01:00 committed by GitHub
parent 1b380ff4b4
commit f3420716ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -314,7 +314,7 @@ func setupEvilGlobals(c *cli.Context, v store.Store, f forge.Forge) error {
// Execution
_events := c.StringSlice("default-cancel-previous-pipeline-events")
events := make([]model.WebhookEvent, len(_events), 0)
events := make([]model.WebhookEvent, 0, len(_events))
for _, v := range _events {
events = append(events, model.WebhookEvent(v))
}