{"record":{"id":"ce9dcf89d9f0cfce","repo":"gastownhall/beads","slug":"dolt-version-output-is-unparseable","errorCode":null,"errorMessage":"dolt version output is unparseable","messagePattern":"dolt version output is unparseable","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"internal/doltversion/errors.go","lineNumber":41,"sourceCode":"\n\t// ErrProbeFailed covers everything that can go wrong actually running\n\t// `<path> version`: the exec call itself failing (including exec\n\t// format errors from architecture/loader mismatches), the process\n\t// timing out, or the process exiting non-zero. These are grouped\n\t// together because callers generally respond to all of them the same\n\t// way (probe failed, do not proceed) even though the underlying causes\n\t// differ; the wrapped error's message still carries the specific cause.\n\tErrProbeFailed = errors.New(\"dolt version probe failed\")\n\n\t// ErrUnparseableVersion means the probe ran and produced output, but\n\t// ParseVersion could not extract a dotted version number from it —\n\t// most commonly the signature of a dev/custom build whose `dolt\n\t// version` output doesn't follow the usual pattern, not of a broken or\n\t// missing binary. Probe itself still returns this as a hard error (the\n\t// caller asked for a parsed version and didn't get one), but\n\t// ProbeWithPolicy demotes it to a *Warning rather than propagating it\n\t// as an error — see ProbeWithPolicy's doc comment for why.\n\tErrUnparseableVersion = errors.New(\"dolt version output is unparseable\")\n)\n","sourceCodeStart":23,"sourceCodeEnd":43,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/doltversion/errors.go#L23-L43","documentation":"ErrUnparseableVersion means the dolt binary ran and produced output, but ParseVersion could not extract a dotted version number from it — most commonly a dev/custom build whose `dolt version` output doesn't follow the usual `x.y.z` pattern. Probe returns it as a hard error; ProbeWithPolicy demotes it to a *Warning rather than failing, since the binary itself works.","triggerScenarios":"ParseVersion or parseToken failing on probe output: calling doltversion.Probe against a dev/custom dolt build printing non-standard version text, a wrapper script that prepends banners/warnings before the version line, or a binary printing localized/garbage output.","commonSituations":"Running a locally built dolt from source that prints a commit hash instead of a version; wrapper scripts or shell profiles emitting extra output; a `dolt` shim that prints a deprecation notice before the real version string.","solutions":["Switch to an official Dolt release whose `dolt version` prints a standard dotted version (e.g. 1.x.y)","If you must keep the custom build, use ProbeWithPolicy so this is treated as a warning instead of a hard error","Inspect `\"$BEADS_DOLT_BIN\" version` output directly and remove any wrapper/shim that pollutes the output"],"exampleFix":"// before\nexport BEADS_DOLT_BIN=~/src/dolt/dolt   # dev build: prints \"dolt dev hash\"\n// after\nexport BEADS_DOLT_BIN=/usr/local/bin/dolt  # official release: prints \"dolt version 1.41.0\"\n// or, in code: v, warn, err := doltversion.ProbeWithPolicy(ctx) // warning, not error","handlingStrategy":"fallback","validationCode":"out, err := exec.Command(binPath, \"version\").Output()\nif err == nil {\n    if _, perr := doltversion.ParseVersion(string(out)); perr != nil {\n        // custom/dev build — switch to an official release or use ProbeWithPolicy\n    }\n}","typeGuard":"func IsDoltVersionUnparseable(err error) bool {\n    return errors.Is(err, doltversion.ErrUnparseableVersion)\n}","tryCatchPattern":"if v, err := doltversion.Probe(ctx, path); err != nil {\n    if errors.Is(err, doltversion.ErrUnparseableVersion) {\n        // binary runs but version text is non-standard; use ProbeWithPolicy\n        // which demotes this to a *Warning and proceeds\n    }\n    return err\n}","preventionTips":["Prefer official dolt releases over dev/custom builds for production","Keep shell wrappers/shims from printing extra output before the version line","Use ProbeWithPolicy when version text is advisory rather than required"],"tags":["go","versioning","parsing","dolt"],"backgroundTag":"unparseable-version-output","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}