{"record":{"id":"88a563f1cc3d053e","repo":"juicedata/juicefs","slug":"invalid-version-string-s","errorCode":null,"errorMessage":"Invalid version string: %s","messagePattern":"Invalid version string: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/config.go","lineNumber":347,"sourceCode":"\t\t\t\tformat.ChangeLogMaxAge = newAge\n\t\t\t}\n\t\tcase \"changelog-max-lines\":\n\t\t\tif new := ctx.Int64(flag); new != format.ChangeLogMaxLines {\n\t\t\t\tif new < 0 {\n\t\t\t\t\treturn fmt.Errorf(\"negative value for %s: %d\", flag, new)\n\t\t\t\t}\n\t\t\t\tmsg.WriteString(fmt.Sprintf(\"%10s: %d -> %d\\n\", flag, format.ChangeLogMaxLines, new))\n\t\t\t\tformat.ChangeLogMaxLines = new\n\t\t\t}\n\t\tcase \"user-group-quota\":\n\t\t\tif new := ctx.Bool(flag); new != format.UserGroupQuota {\n\t\t\t\tmsg.WriteString(fmt.Sprintf(\"%10s: %t -> %t\\n\", flag, format.UserGroupQuota, new))\n\t\t\t\tformat.UserGroupQuota = new\n\t\t\t}\n\t\tcase \"min-client-version\":\n\t\t\tif new := ctx.String(flag); new != format.MinClientVersion {\n\t\t\t\tif version.Parse(new) == nil {\n\t\t\t\t\treturn fmt.Errorf(\"Invalid version string: %s\", new)\n\t\t\t\t}\n\t\t\t\tif compareVersion(new, format.MinClientVersion) < 0 {\n\t\t\t\t\treturn fmt.Errorf(\"cannot lower min-client-version from %s to %s\", format.MinClientVersion, new)\n\t\t\t\t}\n\t\t\t\trequireMinClientVersion(new)\n\t\t\t}\n\t\tcase \"max-client-version\":\n\t\t\tif new := ctx.String(flag); new != format.MaxClientVersion {\n\t\t\t\tif version.Parse(new) == nil {\n\t\t\t\t\treturn fmt.Errorf(\"Invalid version string: %s\", new)\n\t\t\t\t}\n\t\t\t\tmsg.WriteString(fmt.Sprintf(\"%s: %s -> %s\\n\", flag, format.MaxClientVersion, new))\n\t\t\t\tformat.MaxClientVersion = new\n\t\t\t\tclientVer = true\n\t\t\t}\n\t\tcase \"enable-acl\":\n\t\t\tif enableACL := ctx.Bool(flag); enableACL != format.EnableACL {\n\t\t\t\tif enableACL {","sourceCodeStart":329,"sourceCodeEnd":365,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/cmd/config.go#L329-L365","documentation":"Returned by `juicefs config` when min-client-version or max-client-version is given a string that version.Parse cannot interpret. Client version gates must be valid semantic version strings, otherwise mixed-version safety checks would be meaningless.","triggerScenarios":"`juicefs config META --min-client-version 1.2` or any string not matching the expected version format (e.g. missing patch, stray characters).","commonSituations":"Hand-typing versions with typos; using 'v' prefixes or build metadata the parser rejects; scripting versions from non-normalized sources.","solutions":["Use a full, well-formed version string, e.g. `--min-client-version 1.2.0`","Check the exact format accepted by the version package (semver-like x.y.z)","Copy the version from `juicefs version` output"],"exampleFix":"// before\njuicefs config sqlite3://test.db --min-client-version 1.2\n// after\njuicefs config sqlite3://test.db --min-client-version 1.2.0","handlingStrategy":"validation","validationCode":"[[ \"$VER\" =~ ^[0-9]+\\.[0-9]+\\.[0-9]+$ ]] || die \"invalid version: $VER\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use full x.y.z semver strings","Source versions from `juicefs version` output","Add a regex check in wrapper scripts"],"tags":["cli","validation","version"],"backgroundTag":"invalid-argument-format","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}