{"record":{"id":"e15d2f5ee713efb3","repo":"multica-ai/multica","slug":"resolve-s-home-directory-w","errorCode":null,"errorMessage":"resolve %s home directory: %w","messagePattern":"resolve (.+?) home directory: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/cursor_mcp.go","lineNumber":150,"sourceCode":"}\n\nfunc removeCursorMcpAuthFile(projectDataDir string) error {\n\ttarget := filepath.Join(projectDataDir, cursorMcpAuthFile)\n\tif err := os.Remove(target); err != nil && !errors.Is(err, fs.ErrNotExist) {\n\t\treturn fmt.Errorf(\"remove prior cursor mcp auth file: %w\", err)\n\t}\n\treturn nil\n}\n\nfunc resolveCursorMcpAuthSource(source string) (string, error) {\n\tsource = strings.TrimSpace(source)\n\tif source == \"\" {\n\t\treturn \"\", fmt.Errorf(\"%s is empty\", CursorMcpAuthSourceEnv)\n\t}\n\tif source == \"~\" || strings.HasPrefix(source, \"~/\") {\n\t\thome, err := os.UserHomeDir()\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"resolve %s home directory: %w\", CursorMcpAuthSourceEnv, err)\n\t\t}\n\t\tif source == \"~\" {\n\t\t\tsource = home\n\t\t} else {\n\t\t\tsource = filepath.Join(home, source[2:])\n\t\t}\n\t}\n\tif !filepath.IsAbs(source) {\n\t\treturn \"\", fmt.Errorf(\"%s must be an absolute path to %s or its containing Cursor project directory\", CursorMcpAuthSourceEnv, cursorMcpAuthFile)\n\t}\n\tsource = filepath.Clean(source)\n\tinfo, err := os.Stat(source)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"stat %s: %w\", CursorMcpAuthSourceEnv, err)\n\t}\n\tif info.IsDir() {\n\t\tsource = filepath.Join(source, cursorMcpAuthFile)\n\t\tinfo, err = os.Stat(source)","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/cursor_mcp.go#L132-L168","documentation":"Error \"resolve %s home directory: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/cursor_mcp.go:150 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the home directory resolution for the indicated path."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}