MCPcopy Create free account
hub / github.com/ddev/ddev / IsCodespaces

Function IsCodespaces

pkg/nodeps/utils.go:90–95  ·  view source on GitHub ↗

IsCodespaces returns true if running on GitHub Codespaces

()

Source from the content-addressed store, hash-verified

88
89// IsCodespaces returns true if running on GitHub Codespaces
90func IsCodespaces() bool {
91 if IsEnvTrue("DDEV_PRETEND_CODESPACES") {
92 return true
93 }
94 return IsLinux() && os.Getenv("CODESPACES") == "true"
95}
96
97// IsDevcontainer returns true if running in any Devcontainer (including Codespaces)
98func IsDevcontainer() bool {

Callers 8

IsRouterDisabledFunction · 0.92
CanUseHTTPOnlyMethod · 0.92
RenderComposeYAMLMethod · 0.92
DockerEnvMethod · 0.92
GetAllURLsMethod · 0.92
GetDDEVEnvironmentFunction · 0.92
TestIsCodespacesFunction · 0.92
GetHostDockerInternalFunction · 0.92

Calls 2

IsEnvTrueFunction · 0.85
IsLinuxFunction · 0.85

Tested by 1

TestIsCodespacesFunction · 0.74