databricks-cli/libs/runtime/detect.go

15 lines
282 B
Go
Raw Normal View History

package runtime
import (
"context"
"github.com/databricks/cli/libs/env"
)
const envDatabricksRuntimeVersion = "DATABRICKS_RUNTIME_VERSION"
func RunsOnDatabricks(ctx context.Context) bool {
2024-09-04 12:08:11 +00:00
value, ok := env.Lookup(ctx, envDatabricksRuntimeVersion)
return value != "" && ok
}