MCPcopy Create free account
hub / github.com/Noumena-Network/code / isRunningFromBuildDirectory

Function isRunningFromBuildDirectory

src/utils/bundledMode.ts:33–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31}
32
33export function isRunningFromBuildDirectory(): boolean {
34 const invokedPath = normalizeRuntimePath(process.argv[1] || '')
35 const execPath = normalizeRuntimePath(process.execPath || process.argv[0] || '')
36 const pathsToCheck = [invokedPath, execPath]
37 const buildDirs = [
38 '/build-ant/',
39 '/build-external/',
40 '/build-external-native/',
41 '/build-ant-native/',
42 ]
43 return pathsToCheck.some(path => buildDirs.some(dir => path.includes(dir)))
44}
45
46export function isRunningFromSourceBuild(): boolean {
47 const invokedPath = process.argv[1] || ''

Callers 1

isDevelopmentLikeBuildFunction · 0.85

Calls 1

normalizeRuntimePathFunction · 0.85

Tested by

no test coverage detected