Skip to content

Commit bd302c7

Browse files
committed
fix: correct OS detection for BSD variants
Changed OS detection regex to explicitly match freebsd, netbsd, and openbsd instead of using grouped alternation. Previous pattern `(free|net|open)bsd` with end-of-word boundary failed to match names like "openbsd32" where BSD is followed by digits, causing these assets to default to linux. - Fixed openbsd/freebsd/netbsd assets being incorrectly detected as linux - Removed trailing word boundary requirement from osReMisc regex - Updated TASKS.md to mark micro bug as resolved PROMPT: merge the pr, then work on it
1 parent d2f34ef commit bd302c7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

TASKS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- [x] add test for https://github.com/zyedidia/micro, im seeing openbsd match for linux

handler/patterns.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ var (
2424
// if the regexp is meant to match the whole string.
2525

2626
osReMisc = regexp.MustCompile(`(?:[^a-zA-Z0-9]|^)` +
27-
`(aix|android|illumos|ios|linux|(free|net|open)bsd|plan9|solaris)` +
28-
`(?:[^a-zA-Z0-9]|$)`)
27+
`(aix|android|illumos|ios|linux|freebsd|netbsd|openbsd|plan9|solaris)`)
2928
)
3029

3130
// architecture patterns

0 commit comments

Comments
 (0)