ToolsDir returns the base directory for installed tools. Checks DOCKER_AGENT_TOOLS_DIR env var, defaults to ~/.cagent/tools/
()
| 11 | // ToolsDir returns the base directory for installed tools. |
| 12 | // Checks DOCKER_AGENT_TOOLS_DIR env var, defaults to ~/.cagent/tools/ |
| 13 | func ToolsDir() string { |
| 14 | if dir := os.Getenv("DOCKER_AGENT_TOOLS_DIR"); dir != "" { |
| 15 | return filepath.Clean(dir) |
| 16 | } |
| 17 | return filepath.Join(paths.GetDataDir(), "tools") |
| 18 | } |
| 19 | |
| 20 | // BinDir returns the directory where tool binaries/symlinks are placed. |
| 21 | // This is ToolsDir()/bin/ |