()
| 89 | } |
| 90 | |
| 91 | func CNIRuntimeDir() (string, error) { |
| 92 | if !rootlessutil.IsRootless() { |
| 93 | return "/run/cni", nil |
| 94 | } |
| 95 | xdr, err := rootlessutil.XDGRuntimeDir() |
| 96 | if err != nil { |
| 97 | if rootlessutil.IsRootlessChild() { |
| 98 | return "", err |
| 99 | } |
| 100 | xdr = fmt.Sprintf("/run/user/%d", os.Geteuid()) |
| 101 | } |
| 102 | return filepath.Join(xdr, "cni"), nil |
| 103 | } |
| 104 | |
| 105 | func NerdctlTOML() string { |
| 106 | if !rootlessutil.IsRootless() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…