diff --git a/pkg/machine/ocipull/policy.go b/pkg/machine/ocipull/policy.go index aab3b81dda..62ebcdd2ab 100644 --- a/pkg/machine/ocipull/policy.go +++ b/pkg/machine/ocipull/policy.go @@ -41,7 +41,7 @@ func policyPath() (string, error) { if err != nil { return "", fmt.Errorf("could not resolve relative path to binary: %w", err) } - return filepath.Join(p, DefaultPolicyJSONPath, policyfile), nil + return filepath.Join(filepath.Dir(p), DefaultPolicyJSONPath, policyfile), nil } return "", &defaultPolicyError{errs: errs} }