{"record":{"id":"67e59a7e5de27bc5","repo":"hasura/graphql-engine","slug":"failed-to-get-the-absolute-fullpath-of-q-w","errorCode":null,"errorMessage":"failed to get the absolute fullPath of %q: %w","messagePattern":"failed to get the absolute fullPath of %q: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/plugins/plugins.go","lineNumber":322,"sourceCode":"\t\terr = downloadAndExtract(downloadStagingDir, platform.URI, platform.Sha256)\n\t\tif err != nil {\n\t\t\treturn errors.E(op, fmt.Errorf(\"failed to unpack into staging dir: %w\", err))\n\t\t}\n\n\t\terr = moveToInstallDir(downloadStagingDir, installDir, platform.Files)\n\t\tif err != nil {\n\t\t\treturn errors.E(\n\t\t\t\top,\n\t\t\t\tfmt.Errorf(\"failed while moving files to the installation directory: %w\", err),\n\t\t\t)\n\t\t}\n\t}\n\n\tsubPathAbs, err := filepath.Abs(installDir)\n\tif err != nil {\n\t\treturn errors.E(\n\t\t\top,\n\t\t\tfmt.Errorf(\"failed to get the absolute fullPath of %q: %w\", installDir, err),\n\t\t)\n\t}\n\n\tfullPath := filepath.Join(installDir, filepath.FromSlash(platform.Bin))\n\n\tpathAbs, err := filepath.Abs(fullPath)\n\tif err != nil {\n\t\treturn errors.E(\n\t\t\top,\n\t\t\tfmt.Errorf(\"failed to get the absolute fullPath of %q: %w\", fullPath, err),\n\t\t)\n\t}\n\n\tif _, ok := IsSubPath(subPathAbs, pathAbs); !ok {\n\t\tif err != nil {\n\t\t\treturn errors.E(\n\t\t\t\top,\n\t\t\t\tfmt.Errorf(","sourceCodeStart":304,"sourceCodeEnd":340,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/plugins/plugins.go#L304-L340","documentation":"Thrown during plugin installation when filepath.Abs fails to convert the plugin's installation directory into an absolute path. filepath.Abs on most platforms only fails when os.Getwd fails (e.g. the process's working directory was deleted), so this is almost always an environment problem rather than a bad argument. The wrapped error from the OS carries the root cause.","triggerScenarios":"Calling Config.Install or Config.Upgrade, which call installPlugin, when the process's current working directory has been removed (common in cleanup scripts or when the CLI is launched from a deleted temp dir), making filepath.Abs(installDir) fail inside os.Getwd.","commonSituations":"Running the CLI from a directory that was deleted while the process was alive; sandboxed/containerized environments where getwd is not permitted; exotic paths that the OS rejects during absolutization.","solutions":["Check that the directory you launched the CLI from still exists (pwd) and re-run from a stable directory","Inspect the wrapped error (%w) — an ENOENT on getwd confirms the deleted-cwd scenario","If running in a container/sandbox, ensure the workdir is mounted and readable","Report a bug if getwd succeeds but Abs still fails, as that indicates a path-handling issue in the CLI"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"wd, err := os.Getwd()\nif err != nil {\n    // abort before calling Install/Upgrade: CWD is unusable\n    return fmt.Errorf(\"working directory unavailable: %w\", err)\n}\n_ = wd // proceed with plugins.Install/Upgrade","typeGuard":null,"tryCatchPattern":"if err := plugins.Install(...); err != nil {\n    if strings.Contains(err.Error(), \"failed to get the absolute fullPath\") {\n        // re-run from a stable working directory\n    }\n}","preventionTips":["Launch the CLI from a long-lived directory, not a temp dir you delete","Verify os.Getwd succeeds before orchestrating plugin installs"],"tags":["filesystem","plugin-install","path-resolution","working-directory"],"backgroundTag":"working-directory-deleted","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}