Skip to content

Commit

Permalink
fix init on windows failed
Browse files Browse the repository at this point in the history
The failure is due to /dev/null is not existed on windows.
  • Loading branch information
winglq committed Nov 13, 2024
1 parent 6f79eb4 commit 972090a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions splice/splice.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package splice

import (
"fmt"
"internal/goos"

Check failure on line 11 in splice/splice.go

View workflow job for this annotation

GitHub Actions / test (1.15.x)

package internal/goos is not in GOROOT (/opt/hostedtoolcache/go/1.15.15/x64/src/internal/goos)

Check failure on line 11 in splice/splice.go

View workflow job for this annotation

GitHub Actions / test (1.16.x)

package internal/goos is not in GOROOT (/opt/hostedtoolcache/go/1.16.15/x64/src/internal/goos)

Check failure on line 11 in splice/splice.go

View workflow job for this annotation

GitHub Actions / test (1.17.x)

package internal/goos is not in GOROOT (/opt/hostedtoolcache/go/1.17.13/x64/src/internal/goos)

Check failure on line 11 in splice/splice.go

View workflow job for this annotation

GitHub Actions / test (1.18.x)

use of internal package internal/goos not allowed

Check failure on line 11 in splice/splice.go

View workflow job for this annotation

GitHub Actions / test (1.19.x)

use of internal package internal/goos not allowed

Check failure on line 11 in splice/splice.go

View workflow job for this annotation

GitHub Actions / test (1.15.x)

package internal/goos is not in GOROOT (/opt/hostedtoolcache/go/1.15.15/x64/src/internal/goos)

Check failure on line 11 in splice/splice.go

View workflow job for this annotation

GitHub Actions / test (1.16.x)

package internal/goos is not in GOROOT (/opt/hostedtoolcache/go/1.16.15/x64/src/internal/goos)

Check failure on line 11 in splice/splice.go

View workflow job for this annotation

GitHub Actions / test (1.17.x)

package internal/goos is not in GOROOT (/opt/hostedtoolcache/go/1.17.13/x64/src/internal/goos)

Check failure on line 11 in splice/splice.go

View workflow job for this annotation

GitHub Actions / test (1.18.x)

use of internal package internal/goos not allowed

Check failure on line 11 in splice/splice.go

View workflow job for this annotation

GitHub Actions / test (1.19.x)

use of internal package internal/goos not allowed
"io/ioutil"
"log"
"os"
Expand All @@ -34,6 +35,9 @@ const DefaultPipeSize = 16 * 4096
var devNullFD uintptr

func init() {
if goos.IsLinux == 0 {
return
}
content, err := ioutil.ReadFile("/proc/sys/fs/pipe-max-size")
if err != nil {
maxPipeSize = DefaultPipeSize
Expand Down

0 comments on commit 972090a

Please sign in to comment.