node build fixed
This commit is contained in:
22
seanime-2.9.10/internal/util/cmd_not_win.go
Normal file
22
seanime-2.9.10/internal/util/cmd_not_win.go
Normal file
@@ -0,0 +1,22 @@
|
||||
//go:build !windows
|
||||
|
||||
package util
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
func NewCmd(arg string, args ...string) *exec.Cmd {
|
||||
if len(args) == 0 {
|
||||
return exec.Command(arg)
|
||||
}
|
||||
return exec.Command(arg, args...)
|
||||
}
|
||||
|
||||
func NewCmdCtx(ctx context.Context, arg string, args ...string) *exec.Cmd {
|
||||
if len(args) == 0 {
|
||||
return exec.CommandContext(ctx, arg)
|
||||
}
|
||||
return exec.CommandContext(ctx, arg, args...)
|
||||
}
|
||||
Reference in New Issue
Block a user