{"record":{"id":"d4ba72572b88ed27","repo":"ajeetdsouza/zoxide","slug":"pwd-not-found","errorCode":null,"errorMessage":"$PWD not found","messagePattern":"\\$PWD not found","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"templates/xonsh.txt","lineNumber":41,"sourceCode":"    zoxide = typing.cast(str, xonsh.environ.locate_binary(\"zoxide\"))\n    if zoxide is None:\n        zoxide = \"zoxide\"\n    return zoxide\n\n\ndef __zoxide_env() -> dict[str, str]:\n    \"\"\"Returns the current environment.\"\"\"\n    return builtins.__xonsh__.env.detype()  # type: ignore  # pylint:disable=no-member\n\n\ndef __zoxide_pwd() -> str:\n    \"\"\"pwd based on the value of _ZO_RESOLVE_SYMLINKS.\"\"\"\n{%- if resolve_symlinks %}\n    pwd = os.getcwd()\n{%- else %}\n    pwd = __zoxide_env().get(\"PWD\")\n    if pwd is None:\n        raise RuntimeError(\"$PWD not found\")\n{%- endif %}\n    return pwd\n\n\ndef __zoxide_cd(path: str | bytes | None = None) -> None:\n    \"\"\"cd + custom logic based on the value of _ZO_ECHO.\"\"\"\n    if path is None:\n        args = []\n    elif isinstance(path, bytes):\n        args = [path.decode(\"utf-8\")]\n    else:\n        args = [path]\n    _, exc, _ = xonsh.dirstack.cd(args)\n    if exc is not None:\n        raise RuntimeError(exc)\n{%- if echo %}\n    print(__zoxide_pwd())\n{%- endif %}","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/ajeetdsouza/zoxide/blob/ee594e690642c7d86edd960603dcc1950c02baab/templates/xonsh.txt#L23-L59","documentation":"Error \"$PWD not found\" thrown in ajeetdsouza/zoxide.","triggerScenarios":"Thrown at templates/xonsh.txt:41 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ee594e690642c7d86edd960603dcc1950c02baab","analyzedAt":"2026-08-16T10:52:10.953Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}