skopeo: 0.1.18 -> 0.1.22 fix whitespace

This commit is contained in:
Christian Albrecht 2017-06-29 08:54:52 +02:00
parent 05e9c47dc3
commit dd484418a1

View file

@ -6,7 +6,7 @@ index 50e29b2..7108df5 100644
import (
"fmt"
"os"
+ "path/filepath"
+ "path/filepath"
"github.com/Sirupsen/logrus"
"github.com/containers/image/signature"
@ -14,11 +14,11 @@ index 50e29b2..7108df5 100644
policyPath := c.GlobalString("policy")
var policy *signature.Policy // This could be cached across calls, if we had an application context.
var err error
+ var dir string
+ if policyPath == "" {
+ dir, err = filepath.Abs(filepath.Dir(os.Args[0]))
+ policyPath = dir + "/../etc/default-policy.json"
+ }
+ var dir string
+ if policyPath == "" {
+ dir, err = filepath.Abs(filepath.Dir(os.Args[0]))
+ policyPath = dir + "/../etc/default-policy.json"
+ }
if c.GlobalBool("insecure-policy") {
policy = &signature.Policy{Default: []signature.PolicyRequirement{signature.NewPRInsecureAcceptAnything()}}
} else if policyPath == "" {