hasura/graphql-engine · error
failed to get the absolute fullPath of %q: %w
Error message
failed to get the absolute fullPath of %q: %w
What it means
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.
Source
Thrown at cli/plugins/plugins.go:322
err = downloadAndExtract(downloadStagingDir, platform.URI, platform.Sha256)
if err != nil {
return errors.E(op, fmt.Errorf("failed to unpack into staging dir: %w", err))
}
err = moveToInstallDir(downloadStagingDir, installDir, platform.Files)
if err != nil {
return errors.E(
op,
fmt.Errorf("failed while moving files to the installation directory: %w", err),
)
}
}
subPathAbs, err := filepath.Abs(installDir)
if err != nil {
return errors.E(
op,
fmt.Errorf("failed to get the absolute fullPath of %q: %w", installDir, err),
)
}
fullPath := filepath.Join(installDir, filepath.FromSlash(platform.Bin))
pathAbs, err := filepath.Abs(fullPath)
if err != nil {
return errors.E(
op,
fmt.Errorf("failed to get the absolute fullPath of %q: %w", fullPath, err),
)
}
if _, ok := IsSubPath(subPathAbs, pathAbs); !ok {
if err != nil {
return errors.E(
op,
fmt.Errorf(View on GitHub (pinned to 724551b9ae)
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
Defensive patterns
Strategy: validation
Validate before calling
wd, err := os.Getwd()
if err != nil {
// abort before calling Install/Upgrade: CWD is unusable
return fmt.Errorf("working directory unavailable: %w", err)
}
_ = wd // proceed with plugins.Install/Upgrade Try / catch
if err := plugins.Install(...); err != nil {
if strings.Contains(err.Error(), "failed to get the absolute fullPath") {
// re-run from a stable working directory
}
} Prevention
- Launch the CLI from a long-lived directory, not a temp dir you delete
- Verify os.Getwd succeeds before orchestrating plugin installs
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- error finding absolute path for project directory: %w
- error getting current working directory: %w
- could not get files using a glob string: %w
- no files in the plugin archive matched the glob pattern=%s
- could not find move targets: %w
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/67e59a7e5de27bc5.
Report an issue: GitHub.