MCPcopy Create free account
hub / github.com/cameri/nostream / ensureNotRoot

Function ensureNotRoot

src/cli/utils/bootstrap.ts:7–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5import { getConfigBaseDir, getDefaultSettingsFilePath, getProjectPath, getSettingsFilePath } from './paths'
6
7export const ensureNotRoot = (): void => {
8 if (typeof process.geteuid === 'function' && process.geteuid() === 0) {
9 throw new Error('Nostream should not be run as root.')
10 }
11}
12
13export const ensureConfigBootstrap = (): void => {
14 const configDir = getConfigBaseDir()

Callers 1

runStartFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected