From a61bbe85f614cd822782be42b51208858b77eab3 Mon Sep 17 00:00:00 2001 From: Keith Patrick Date: Thu, 11 Jun 2026 13:49:58 +0100 Subject: [PATCH] fix(pkg-helper): pass -n to sudo to prevent blocking on password prompts --- cmd/pkg-helper/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/pkg-helper/main.go b/cmd/pkg-helper/main.go index 22ec1db8..01239c84 100644 --- a/cmd/pkg-helper/main.go +++ b/cmd/pkg-helper/main.go @@ -227,7 +227,8 @@ var runApkFunc = runApk func runApk(args ...string) ([]byte, error) { if os.Getuid() != 0 { if sudo, err := exec.LookPath("sudo"); err == nil { - sudoArgs := append([]string{"apk"}, args...) + // Use -n to prevent blocking on interactive password prompts + sudoArgs := append([]string{"-n", "apk"}, args...) return exec.Command(sudo, sudoArgs...).CombinedOutput() } }