Skip to content

Commit aec5436

Browse files
authored
Merge pull request #4761 from AkihiroSuda/cni-homebrew
CNI: add Homebrew's installation path
2 parents 1441fbe + a1cffd6 commit aec5436

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/faq.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ The default value is automatically detected by checking the following candidates
218218
- `~/opt/cni/bin`
219219
- `/usr/local/libexec/cni`
220220
- `/usr/local/lib/cni`
221+
- `/home/linuxbrew/.linuxbrew/opt/cni-plugins/bin`
221222
- `/usr/libexec/cni`
222223
- `/usr/lib/cni`
223224
- `/opt/cni/bin`

pkg/defaults/defaults_linux.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ func CNIPath() string {
5050
cni.DefaultCNIDir, // /opt/cni/bin
5151
"/usr/local/libexec/cni",
5252
"/usr/local/lib/cni",
53-
"/usr/libexec/cni", // Fedora
54-
"/usr/lib/cni", // debian (containernetworking-plugins)
53+
"/home/linuxbrew/.linuxbrew/opt/cni-plugins/bin", // Homebrew
54+
"/usr/libexec/cni", // Fedora
55+
"/usr/lib/cni", // debian (containernetworking-plugins)
5556
}
5657
if rootlessutil.IsRootless() {
5758
home := os.Getenv("HOME")

0 commit comments

Comments
 (0)