Skip to content

Commit

Permalink
update: allow more spaces for .tool-versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ronnnnn committed Jul 30, 2024
1 parent 4bc047a commit 3a29130
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ jobs:
file: .tool-versions
run: |
echo "bun1.1.0" > .tool-versions
- name: .tool-versions (bun 1.1.0)
file: .tool-versions
run: |
echo "bun 1.1.0" > .tool-versions
- name: .bumrc (1.1.0)
file: .bumrc
run: |
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,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, // https://github.com/owenizedd/bum
".bun-version": (content: string) => content,
};
Expand Down

0 comments on commit 3a29130

Please sign in to comment.