Skip to content

Commit 1923f5c

Browse files
committed
Run gpg in batch mode
1 parent d3f2029 commit 1923f5c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

upload.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,12 @@ func uploadReleaseIndex(ctx context.Context, bucket *blob.Bucket, dist distribut
9090
return nil
9191
}
9292

93-
clearSign := exec.CommandContext(ctx, "gpg", "-a", "-u", keyID+"!", "--clear-sign")
93+
clearSign := exec.CommandContext(ctx, "gpg",
94+
"--batch",
95+
"--armor",
96+
"--local-user", keyID+"!",
97+
"--clear-sign",
98+
)
9499
clearSign.Stdin = bytes.NewReader(data.Bytes())
95100
clearSignOutput := new(bytes.Buffer)
96101
clearSign.Stdout = clearSignOutput
@@ -105,7 +110,12 @@ func uploadReleaseIndex(ctx context.Context, bucket *blob.Bucket, dist distribut
105110
return fmt.Errorf("upload InRelease: %w", err)
106111
}
107112

108-
detachSign := exec.CommandContext(ctx, "gpg", "-a", "-u", keyID+"!", "--detach-sign")
113+
detachSign := exec.CommandContext(ctx, "gpg",
114+
"--batch",
115+
"--armor",
116+
"--local-user", keyID+"!",
117+
"--detach-sign",
118+
)
109119
detachSign.Stdin = bytes.NewReader(data.Bytes())
110120
detachSignOutput := new(bytes.Buffer)
111121
detachSign.Stdout = detachSignOutput

0 commit comments

Comments
 (0)