Skip to content

Commit

Permalink
[fix] windowsの場合SysProcAttrを設定しないよう修正
Browse files Browse the repository at this point in the history
  • Loading branch information
shinosaki committed Feb 18, 2025
1 parent 43d6055 commit b05778a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/alert/alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"net/http"
"os"
"os/exec"
"runtime"
"slices"
"syscall"
"time"
Expand Down Expand Up @@ -49,8 +50,10 @@ func Alert(

// nico.Client(program.Id, client, sc)
proc := exec.Command(os.Args[0], "recorder", program.Id)
proc.SysProcAttr = &syscall.SysProcAttr{
Setsid: true,
if runtime.GOOS != "windows" {
proc.SysProcAttr = &syscall.SysProcAttr{
Setsid: true,

Check failure on line 55 in internal/alert/alert.go

View workflow job for this annotation

GitHub Actions / build (windows, amd64)

unknown field Setsid in struct literal of type syscall.SysProcAttr

Check failure on line 55 in internal/alert/alert.go

View workflow job for this annotation

GitHub Actions / build (windows, arm64)

unknown field Setsid in struct literal of type syscall.SysProcAttr
}
}

if err := proc.Run(); err != nil {
Expand Down

0 comments on commit b05778a

Please sign in to comment.