GetDDEVEnvironment returns the type of environment DDEV is being used in
()
| 21 | |
| 22 | // GetDDEVEnvironment returns the type of environment DDEV is being used in |
| 23 | func GetDDEVEnvironment() string { |
| 24 | e := runtime.GOOS |
| 25 | switch { |
| 26 | case nodeps.IsCodespaces(): |
| 27 | e = DDEVEnvironmentCodespaces |
| 28 | case nodeps.IsDevcontainer(): |
| 29 | e = DDEVEnvironmentDevcontainer |
| 30 | case nodeps.IsWSL2(): |
| 31 | e = wsl2Environment() |
| 32 | } |
| 33 | |
| 34 | return e |
| 35 | } |
| 36 | |
| 37 | // wsl2Environment returns the specific WSL2 environment type by calling |
| 38 | // GetWSL2NetworkingMode once. nat is the common case; others are unusual. |
no test coverage detected