From fbbf1732b300264869b0bfb4ae717b9ca7183ec1 Mon Sep 17 00:00:00 2001 From: cclohmar Date: Tue, 7 Jul 2026 15:12:58 +0100 Subject: [PATCH] fix: lego v5 arg order (flags after run command) --- tools/nextwks-tool/main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/nextwks-tool/main.go b/tools/nextwks-tool/main.go index aace72a..d82dbcc 100644 --- a/tools/nextwks-tool/main.go +++ b/tools/nextwks-tool/main.go @@ -164,8 +164,8 @@ func obtainCertsLego(domains []string, email, backupDir, legoDir, legoPath strin return fmt.Errorf("creating lego dir: %w", err) } - // Build lego args - args := []string{ + // Build lego args (v5+: flags go after the command) + args := []string{"run", "--email", email, "--http", "--http.port", ":80", @@ -175,7 +175,6 @@ func obtainCertsLego(domains []string, email, backupDir, legoDir, legoPath strin for _, d := range domains { args = append(args, "--domains", d) } - args = append(args, "run") cmd := exec.Command(legoPath, args...) cmd.Stdout = os.Stdout