Bug Description
getVersion in src/lib/clients/system.ts (lines 52-72) silently
returns empty string when the version regex doesn't match tool output.
Root Cause
If toolResponse.stdout.match(/(\d+\.\d+\.\d+)/) returns null,
the inner try block completes without exception, inner catch is
never triggered, and the function falls through to return ""
at line 72.
Impact
The caller checkVersion then calls:
semver.satisfies("", ">=18.0.0") → returns false
This throws a misleading VersionRequiredError:
"Docker 25.0.0 or higher is required. Please update Docker"
When Docker IS the right version — the output format simply
didn't match the regex.
Steps to Reproduce
- Install a tool whose
--version output doesn't match
\d+\.\d+\.\d+ pattern (e.g., outputs v22.0.0)
- Run
genlayer up
- Observe misleading "please update" error
Suggested Fix
if (versionMatch) {
return versionMatch[1];
}
// Add this:
throw new Error(`Could not parse ${toolName} version from output: ${toolResponse.stdout}`);
File
src/lib/clients/system.ts lines 52-72
Severity: High
Already reported: No
Bug Description
getVersioninsrc/lib/clients/system.ts(lines 52-72) silentlyreturns empty string when the version regex doesn't match tool output.
Root Cause
If
toolResponse.stdout.match(/(\d+\.\d+\.\d+)/)returns null,the inner try block completes without exception, inner catch is
never triggered, and the function falls through to
return ""at line 72.
Impact
The caller
checkVersionthen calls:semver.satisfies("", ">=18.0.0")→ returnsfalseThis throws a misleading
VersionRequiredError:When Docker IS the right version — the output format simply
didn't match the regex.
Steps to Reproduce
--versionoutput doesn't match\d+\.\d+\.\d+pattern (e.g., outputsv22.0.0)genlayer upSuggested Fix
File
src/lib/clients/system.tslines 52-72Severity: High
Already reported: No