From 69cf77383458c38987d99df348bab38a8d997386 Mon Sep 17 00:00:00 2001 From: binwiederhier Date: Thu, 22 May 2025 21:56:28 -0400 Subject: [PATCH] Fix webpush command --- cmd/webpush.go | 6 +++--- main.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/webpush.go b/cmd/webpush.go index a5f66e60..249f91c8 100644 --- a/cmd/webpush.go +++ b/cmd/webpush.go @@ -44,16 +44,16 @@ func generateWebPushKeys(c *cli.Context) error { return err } - if outputFIle := c.String("output-file"); outputFIle != "" { + if outputFile := c.String("output-file"); outputFile != "" { contents := fmt.Sprintf(`--- web-push-public-key: %s web-push-private-key: %s `, publicKey, privateKey) - err = os.WriteFile(outputFIle, []byte(contents), 0660) + err = os.WriteFile(outputFile, []byte(contents), 0660) if err != nil { return err } - _, err = fmt.Fprintf(c.App.ErrWriter, `Web Push keys written to %s.`, outputFIle) + _, err = fmt.Fprintf(c.App.ErrWriter, "Web Push keys written to %s.\n", outputFile) } else { _, err = fmt.Fprintf(c.App.ErrWriter, `Web Push keys generated. Add the following lines to your config file: diff --git a/main.go b/main.go index d23072d5..4e01a0d6 100644 --- a/main.go +++ b/main.go @@ -23,7 +23,7 @@ If you want to chat, simply join the Discord server (https://discord.gg/cT7ECsZj the Matrix room (https://matrix.to/#/#ntfy:matrix.org). ntfy %s (%s), runtime %s, built at %s -Copyright (C) Philipp C. Heckel, licensed under Apache License 2.0 & GPLv2 +Copyright (C) Philipp C. Heckel, licensed under Apache License 2.0 & GPLv2 `, version, commit[:7], runtime.Version(), date) app := cmd.New()