gastownhall/beads · error

--proxied-server-root-path must be an absolute path, got %q

Error message

--proxied-server-root-path must be an absolute path, got %q

What it means

`bd init` requires `--proxied-server-root-path` to be an absolute filesystem path. Relative paths are rejected so the stored dolt sql-server root path remains unambiguous regardless of the working directory the daemon later runs from. `filepath.IsAbs` on the supplied value is the gate (cmd/bd/init.go:473-475).

Source

Thrown at cmd/bd/init.go:474

			}
		}
		if serverLogPath != "" {
			if !initProxiedServer {
				return fmt.Errorf("--proxied-server-log-path requires --proxied-server")
			}
			if !filepath.IsAbs(serverLogPath) {
				return fmt.Errorf("--proxied-server-log-path must be an absolute path, got %q", serverLogPath)
			}
			if err := validateProxiedServerLogPath(serverLogPath); err != nil {
				return fmt.Errorf("--proxied-server-log-path %v", err)
			}
		}
		if serverRootPath != "" {
			if !initProxiedServer {
				return fmt.Errorf("--proxied-server-root-path requires --proxied-server")
			}
			if !filepath.IsAbs(serverRootPath) {
				return fmt.Errorf("--proxied-server-root-path must be an absolute path, got %q", serverRootPath)
			}
			if err := validateProxiedServerRootPath(serverRootPath); err != nil {
				return fmt.Errorf("--proxied-server-root-path %v", err)
			}
		}
		if serverProxyPort != 0 {
			if !initProxiedServer {
				return fmt.Errorf("--proxied-server-port requires --proxied-server")
			}
			if serverProxyPort < 1 || serverProxyPort > 65535 {
				return fmt.Errorf("--proxied-server-port must be between 1 and 65535, got %d", serverProxyPort)
			}
		}
		if idleTimeoutSet {
			if !initProxiedServer {
				return fmt.Errorf("--proxied-server-idle-timeout requires --proxied-server")
			}
			if serverProxyIdleTimeout < 0 {

View on GitHub (pinned to 71377f2769)

Solutions

  1. Pass an absolute path: replace a relative value with one starting at `/` (or a drive letter on Windows).
  2. Expand variables/`~` in scripts before invoking: use `$(pwd)/dolt-data` or `abspath` in your tooling.
  3. Omit the flag entirely to use the default proxied-server root location.

Example fix

// before
bd init --proxied-server --proxied-server-root-path ./dolt-data
// after
bd init --proxied-server --proxied-server-root-path /var/lib/beads/dolt-data
Defensive patterns

Strategy: validation

Validate before calling

#!/usr/bin/env bash
ROOT_PATH="${ROOT_PATH:?}"
case "$ROOT_PATH" in
  /*) ;;                     # absolute, ok
  *) ROOT_PATH="$(cd "$(dirname "$ROOT_PATH")" && pwd)/$(basename "$ROOT_PATH")" ;;
esac

Type guard

func isAbsRootPath(p string) bool { return filepath.IsAbs(p) }

Try / catch

if out, err := exec.Command("bd", "init", args...).CombinedOutput(); err != nil {
    if strings.Contains(string(out), "must be an absolute path") {
        // convert to absolute path and retry
    }
}

Prevention

When it happens

Trigger: Running e.g. `bd init --proxied-server --proxied-server-root-path ./dolt-data` or `--proxied-server-root-path dolt-data` — any non-absolute value for serverRootPath.

Common situations: Typing a path relative to the current directory in scripts; templated config where an env var like $DATA_DIR is empty, leaving just the remainder of a relative path; Windows-style paths pasted into POSIX shells or vice versa.

Related errors


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/f519de0d42557a66. Report an issue: GitHub.