Skip to content

Commit dbae2b0

Browse files
committed
fix: remove redundant runtime.GOOS check in windows_test.go
- Remove unnecessary runtime.GOOS != 'windows' check in windows_test.go - File has //go:build windows constraint, so check is always false - Fix SA4032 staticcheck error for GitHub Actions compatibility - Remove unused runtime import after cleanup
1 parent dda5617 commit dbae2b0

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

pkg/detector/windows_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package detector
55
import (
66
"os"
77
"path/filepath"
8-
"runtime"
98
"testing"
109
)
1110

@@ -34,11 +33,6 @@ func TestWindowsSpecificPaths(t *testing.T) {
3433
}
3534

3635
func TestWindowsExecutableCheck(t *testing.T) {
37-
// 只在 Windows 系统上测试
38-
if runtime.GOOS != "windows" {
39-
t.Skip("跳过在非Windows系统上的可执行性测试")
40-
}
41-
4236
// 在 Windows 上创建测试文件
4337
tmpDir := t.TempDir()
4438
tmpFile := filepath.Join(tmpDir, "composer.bat")

0 commit comments

Comments
 (0)