mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
Add prompts when running gpg.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
@@ -28,6 +29,8 @@ func (g *GpgSigner) SetKey(keyRef string) {
|
||||
|
||||
// DetachedSign signs file with detached signature in ASCII format
|
||||
func (g *GpgSigner) DetachedSign(source string, destination string) error {
|
||||
fmt.Println("Signing file '%s' with gpg, please enter your passphrase when prompted:\n")
|
||||
|
||||
args := []string{"-o", destination, "--armor", "--yes"}
|
||||
if g.keyRef != "" {
|
||||
args = append(args, "-u", g.keyRef)
|
||||
@@ -39,6 +42,7 @@ func (g *GpgSigner) DetachedSign(source string, destination string) error {
|
||||
|
||||
// ClearSign clear-signs the file
|
||||
func (g *GpgSigner) ClearSign(source string, destination string) error {
|
||||
fmt.Println("Clearsigning file '%s' with gpg, please enter your passphrase when prompted:\n")
|
||||
args := []string{"-o", destination, "--yes"}
|
||||
if g.keyRef != "" {
|
||||
args = append(args, "-u", g.keyRef)
|
||||
|
||||
Reference in New Issue
Block a user