summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-01-10 11:39:10 -0800
committerGitHub <noreply@github.com>2019-01-10 11:39:10 -0800
commit3c44c532d10a42645886fce9618c09bb8f4940dd (patch)
tree25487f9ca04a28c15fd161cdd7c29afeb2c05c78 /cmd
parentc3f632d85ae11bb8b447ec5d8e9ef281b6b8ac7f (diff)
parentb208b86dda384b2c44d6330d7ee6b01c345e1f42 (diff)
downloadpodman-3c44c532d10a42645886fce9618c09bb8f4940dd.tar.gz
podman-3c44c532d10a42645886fce9618c09bb8f4940dd.tar.bz2
podman-3c44c532d10a42645886fce9618c09bb8f4940dd.zip
Merge pull request #2127 from QiWang19/fixsigstore
fix up sigstore path
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/sign.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/podman/sign.go b/cmd/podman/sign.go
index e7367a311..1d9aecdc9 100644
--- a/cmd/podman/sign.go
+++ b/cmd/podman/sign.go
@@ -141,7 +141,8 @@ func signCmd(c *cli.Context) error {
return errors.Wrapf(err, "error creating new signature")
}
- sigStoreDir = filepath.Join(sigStoreDir, strings.Replace(repos[0][strings.Index(repos[0], "/")+1:len(repos[0])], ":", "=", 1))
+ trimmedDigest := strings.TrimPrefix(repos[0], strings.Split(repos[0], "/")[0])
+ sigStoreDir = filepath.Join(sigStoreDir, strings.Replace(trimmedDigest, ":", "=", 1))
if err := os.MkdirAll(sigStoreDir, 0751); err != nil {
// The directory is allowed to exist
if !os.IsExist(err) {