diff --git a/pkgs/development/tools/skopeo/path.patch b/pkgs/development/tools/skopeo/path.patch index 35dec5aecbfd..eb3c54ae66c4 100644 --- a/pkgs/development/tools/skopeo/path.patch +++ b/pkgs/development/tools/skopeo/path.patch @@ -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 == "" {