mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
fix for ci/cd
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package logger
|
||||
|
||||
@@ -7,6 +6,8 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func initPanicFile(panicFile string) io.WriteCloser {
|
||||
@@ -14,7 +15,7 @@ func initPanicFile(panicFile string) io.WriteCloser {
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("error in open panic: %v", err))
|
||||
}
|
||||
if err = Dup2(int(file.Fd()), int(os.Stderr.Fd())); err != nil {
|
||||
if err = unix.Dup2(int(file.Fd()), int(os.Stderr.Fd())); err != nil {
|
||||
panic(fmt.Sprintf("error in syscall.Dup2: %v", err))
|
||||
}
|
||||
return file
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
//go:build linux && amd64
|
||||
// +build linux,amd64
|
||||
|
||||
package logger
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func Dup2(oldfd int, newfd int) error {
|
||||
return syscall.Dup2(oldfd, newfd)
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
//go:build linux && arm64
|
||||
// +build linux,arm64
|
||||
|
||||
package logger
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func Dup2(oldfd int, newfd int) error {
|
||||
return syscall.Dup3(oldfd, newfd, 0)
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
//go:build darwin
|
||||
// +build darwin
|
||||
|
||||
package logger
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func Dup2(oldfd int, newfd int) error {
|
||||
return syscall.Dup2(oldfd, newfd)
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
//go:build linux && loong64
|
||||
// +build linux,loong64
|
||||
|
||||
package logger
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func Dup2(oldfd int, newfd int) error {
|
||||
return syscall.Dup3(oldfd, newfd, 0)
|
||||
}
|
||||
Reference in New Issue
Block a user