MCPcopy Index your code
hub / github.com/promptfoo/promptfoo / getEnvInt

Function getEnvInt

src/python/pythonUtils.ts:27–34  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

25 * @returns The parsed integer value, or undefined if not set or not a valid integer
26 */
27export function getEnvInt(key: string): number | undefined {
28 const value = process.env[key];
29 if (value === undefined) {
30 return undefined;
31 }
32 const parsed = parseInt(value, 10);
33 return isNaN(parsed) ? undefined : parsed;
34}
35
36/**
37 * Resolves the Python executable path from explicit config and environment.

Callers 1

getWorkerCountMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…