forked from containers/common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_darwin.go
40 lines (34 loc) · 1022 Bytes
/
config_darwin.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package config
import (
"os"
)
const (
// OverrideContainersConfig holds the default config path overridden by the root user
OverrideContainersConfig = "/etc/" + _configPath
// DefaultContainersConfig holds the default containers config path
DefaultContainersConfig = "/usr/share/" + _configPath
)
// podman remote clients on darwin cannot use unshare.isRootless() to determine the configuration file locations.
func customConfigFile() (string, error) {
if path, found := os.LookupEnv("CONTAINERS_CONF"); found {
return path, nil
}
return rootlessConfigPath()
}
func ifRootlessConfigPath() (string, error) {
return rootlessConfigPath()
}
var defaultHelperBinariesDir = []string{
// Homebrew install paths
"/usr/local/opt/podman/libexec",
"/opt/homebrew/bin",
"/opt/homebrew/opt/podman/libexec",
"/usr/local/bin",
// default paths
"/usr/local/libexec/podman",
"/usr/local/lib/podman",
"/usr/libexec/podman",
"/usr/lib/podman",
// Relative to the binary directory
"$BINDIR/../libexec/podman",
}