mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-30 04:20:53 +00:00
GPG signer shouldn't report full path name. #15
This commit is contained in:
+3
-2
@@ -7,6 +7,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
@@ -83,7 +84,7 @@ func (g *GpgSigner) Init() error {
|
|||||||
|
|
||||||
// DetachedSign signs file with detached signature in ASCII format
|
// DetachedSign signs file with detached signature in ASCII format
|
||||||
func (g *GpgSigner) DetachedSign(source string, destination string) error {
|
func (g *GpgSigner) DetachedSign(source string, destination string) error {
|
||||||
fmt.Printf("Signing file '%s' with gpg, please enter your passphrase when prompted:\n", source)
|
fmt.Printf("Signing file '%s' with gpg, please enter your passphrase when prompted:\n", filepath.Base(source))
|
||||||
|
|
||||||
args := []string{"-o", destination, "--armor", "--yes"}
|
args := []string{"-o", destination, "--armor", "--yes"}
|
||||||
args = append(args, g.gpgArgs()...)
|
args = append(args, g.gpgArgs()...)
|
||||||
@@ -97,7 +98,7 @@ func (g *GpgSigner) DetachedSign(source string, destination string) error {
|
|||||||
|
|
||||||
// ClearSign clear-signs the file
|
// ClearSign clear-signs the file
|
||||||
func (g *GpgSigner) ClearSign(source string, destination string) error {
|
func (g *GpgSigner) ClearSign(source string, destination string) error {
|
||||||
fmt.Printf("Clearsigning file '%s' with gpg, please enter your passphrase when prompted:\n", source)
|
fmt.Printf("Clearsigning file '%s' with gpg, please enter your passphrase when prompted:\n", filepath.Base(source))
|
||||||
args := []string{"-o", destination, "--yes"}
|
args := []string{"-o", destination, "--yes"}
|
||||||
args = append(args, g.gpgArgs()...)
|
args = append(args, g.gpgArgs()...)
|
||||||
args = append(args, "--clearsign", source)
|
args = append(args, "--clearsign", source)
|
||||||
|
|||||||
Reference in New Issue
Block a user