{"record":{"id":"ee6fcfb92a4ed516","repo":"deepseek-ai/deepseek-harness","slug":"binname-path-sets-name-which-only-the","errorCode":null,"errorMessage":"${binName}: ${path} sets \"${name}\", which only the launching environment may set (it decides how this process starts, where its code and instructions load from, or how it reaches the network); export ${name} instead of putting it in a .env file","messagePattern":"(.+?): (.+?) sets \"(.+?)\", which only the launching environment may set \\(it decides how this process starts, where its code and instructions load from, or how it reaches the network\\); export (.+?) instead of putting it in a \\.env file","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/boot/app-boot/src/index.ts","lineNumber":157,"sourceCode":"function readEnvLayer(\n  binName: string, dir: string, warn: (line: string) => void,\n): { path: string; values: Record<string, string> } | undefined {\n  const path = resolve(dir, '.env')\n  let content: string\n  try {\n    content = readFileSync(path, 'utf8')\n  } catch (error) {\n    if ((error as NodeJS.ErrnoException | null)?.code !== 'ENOENT') {\n      warn(`${binName}: failed to load .env: ${String(error)}\\n`)\n    }\n    // ENOENT (no .env) is fine — rely on the ambient environment.\n    return undefined\n  }\n  // Parse once so validation and materialization use exactly the same entries.\n  const values = parseEnv(content) as Record<string, string>\n  for (const name of Object.keys(values)) {\n    if (!isBootstrapOnly(name)) continue\n    throw new Error(\n      `${binName}: ${path} sets \"${name}\", which only the launching environment may set`\n      + ' (it decides how this process starts, where its code and instructions load from, or how it'\n      + ` reaches the network); export ${name} instead of putting it in a .env file`,\n    )\n  }\n  return { path, values }\n}\n\n/**\n * Load the product CLI's inherited > invoking-directory `.env` > Harness-home\n * `.env` snapshot. The Harness home resolves before either file; both files\n * are checked before either is applied, and accepted values are materialized\n * without replacing inherited ones. The snapshot preserves which layer supplied each value.\n * @param binName - the diagnostic prefix on the diagnostics.\n * @param cwd - the invoking directory whose `.env` is the project layer.\n * @param warn - sink for the one-line misconfiguration diagnostics.\n * @returns this run's frozen environment snapshot.\n * @throws when either file declares a bootstrap-only variable.","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/boot/app-boot/src/index.ts#L139-L175","documentation":"Error \"${binName}: ${path} sets \"${name}\", which only the launching environment may set (it decides how this process starts, where its code and instructions load from, or how it reaches the network); export ${name} instead of putting it in a .env file\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/boot/app-boot/src/index.ts:157 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Export the variable in the launching shell instead of placing it in the .env file."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}