only run this once.
()
| 258 | |
| 259 | // only run this once. |
| 260 | func isRunningInDocker() bool { |
| 261 | // docker creates a .dockerenv file at the root of the container. |
| 262 | _, err := os.Stat("/.dockerenv") |
| 263 | return err == nil |
| 264 | } |
| 265 | |
| 266 | // expandHomedir expands a ~ to a homedir, or returns the original path in case of any error. |
| 267 | func expandHomedir(filePath string) string { |
no outgoing calls
no test coverage detected