fix: make whitespace in .tool-versions optional

This commit is contained in:
Jozef Steinhübl 2024-05-07 20:40:33 +02:00
parent a61c3e7932
commit 13cc864142
No known key found for this signature in database
GPG key ID: E6BC90C91973B08F

View file

@ -21,7 +21,7 @@ const FILE_VERSION_READERS = {
"package.json": (content: string) =>
JSON.parse(content).packageManager?.split("bun@")?.[1],
".tool-versions": (content: string) =>
content.match(/^bun\s(?<version>.*?)$/m)?.groups?.version,
content.match(/^bun\s?(?<version>.*?)$/m)?.groups?.version,
".bumrc": (content: string) => content,
};