MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / hasContainerEnv

Function hasContainerEnv

packages/cli/src/utils/is-container.ts:7–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5
6// Podman detection
7const hasContainerEnv = () => {
8 try {
9 fs.statSync('/run/.containerenv');
10 return true;
11 } catch {
12 return false;
13 }
14};
15
16export function isInContainer() {
17 // TODO: Use `??=` when targeting Node.js 16.

Callers 1

isInContainerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected