diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2019-01-09 13:23:01 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2019-01-09 15:19:46 -0500 |
commit | 55583bdfa684d9c10ee5b9f2d88c24101a12ef17 (patch) | |
tree | 80b7e8cd9ee4c57a076a528ebc1ec2b49432a60a /cmd/podman | |
parent | c37f73159609b203545ca6fe54c86b9deacfca21 (diff) | |
download | podman-55583bdfa684d9c10ee5b9f2d88c24101a12ef17.tar.gz podman-55583bdfa684d9c10ee5b9f2d88c24101a12ef17.tar.bz2 podman-55583bdfa684d9c10ee5b9f2d88c24101a12ef17.zip |
Fix up image sign and trust
Add completions
Fix man pages
fix code in sign to answer PR Comments.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/sign.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/podman/sign.go b/cmd/podman/sign.go index 790b6031d..aa3e0cab7 100644 --- a/cmd/podman/sign.go +++ b/cmd/podman/sign.go @@ -1,10 +1,10 @@ package main import ( - "fmt" "io/ioutil" "net/url" "os" + "path/filepath" "strconv" "strings" @@ -138,7 +138,7 @@ func signCmd(c *cli.Context) error { return errors.Wrapf(err, "error creating new signature") } - sigStoreDir = fmt.Sprintf("%s/%s", sigStoreDir, strings.Replace(repos[0][strings.Index(repos[0], "/")+1:len(repos[0])], ":", "=", 1)) + sigStoreDir = filepath.Join(sigStoreDir, strings.Replace(repos[0][strings.Index(repos[0], "/")+1:len(repos[0])], ":", "=", 1)) if err := os.MkdirAll(sigStoreDir, 0751); err != nil { // The directory is allowed to exist if !os.IsExist(err) { @@ -151,7 +151,7 @@ func signCmd(c *cli.Context) error { logrus.Errorf("error creating sigstore file: %v", err) continue } - err = ioutil.WriteFile(sigStoreDir+"/"+sigFilename, newSig, 0644) + err = ioutil.WriteFile(filepath.Join(sigStoreDir, sigFilename), newSig, 0644) if err != nil { logrus.Errorf("error storing signature for %s", rawSource.Reference().DockerReference().String()) continue |