Skip to content

Commit 1a72561

Browse files
committed
Remove the kill package dependency
1 parent 7d9eaea commit 1a72561

File tree

8 files changed

+0
-248
lines changed

8 files changed

+0
-248
lines changed

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ require (
1616
github.com/jesseduffield/generics v0.0.0-20250517122708-b0b4a53a6f5c
1717
github.com/jesseduffield/go-git/v5 v5.14.1-0.20250407170251-e1a013310ccd
1818
github.com/jesseduffield/gocui v0.3.1-0.20250711082438-4aa4fd0b4d22
19-
github.com/jesseduffield/kill v0.0.0-20250101124109-e216ddbe133a
2019
github.com/jesseduffield/lazycore v0.0.0-20221012050358-03d2e40243c5
2120
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e
2221
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,6 @@ github.com/jesseduffield/go-git/v5 v5.14.1-0.20250407170251-e1a013310ccd h1:ViKj
196196
github.com/jesseduffield/go-git/v5 v5.14.1-0.20250407170251-e1a013310ccd/go.mod h1:lRhCiBr6XjQrvcQVa+UYsy/99d3wMXn/a0nSQlhnhlA=
197197
github.com/jesseduffield/gocui v0.3.1-0.20250711082438-4aa4fd0b4d22 h1:vhMwEsLlMtuKKo9/z3Qcggycgad8oV7+siwOZEnJDOs=
198198
github.com/jesseduffield/gocui v0.3.1-0.20250711082438-4aa4fd0b4d22/go.mod h1:sLIyZ2J42R6idGdtemZzsiR3xY5EF0KsvYEGh3dQv3s=
199-
github.com/jesseduffield/kill v0.0.0-20250101124109-e216ddbe133a h1:UDeJ3EBk04bXDLOPvuqM3on8HvyJfISw0+UMqW+0a4g=
200-
github.com/jesseduffield/kill v0.0.0-20250101124109-e216ddbe133a/go.mod h1:FSWDLKT0NQpntbDd1H3lbz51fhCVlMzy/J0S6nM727Q=
201199
github.com/jesseduffield/lazycore v0.0.0-20221012050358-03d2e40243c5 h1:CDuQmfOjAtb1Gms6a1p5L2P8RhbLUq5t8aL7PiQd2uY=
202200
github.com/jesseduffield/lazycore v0.0.0-20221012050358-03d2e40243c5/go.mod h1:qxN4mHOAyeIDLP7IK7defgPClM/z1Kze8VVQiaEjzsQ=
203201
github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e h1:uw/oo+kg7t/oeMs6sqlAwr85ND/9cpO3up3VxphxY0U=

pkg/commands/oscommands/os.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
"github.com/samber/lo"
1414

1515
"github.com/atotto/clipboard"
16-
"github.com/jesseduffield/kill"
1716
"github.com/jesseduffield/lazygit/pkg/common"
1817
"github.com/jesseduffield/lazygit/pkg/config"
1918
"github.com/jesseduffield/lazygit/pkg/utils"
@@ -264,16 +263,6 @@ func (c *OSCommand) PipeCommands(cmdObjs ...*CmdObj) error {
264263
return nil
265264
}
266265

267-
// Kill kills a process. If the process has Setpgid == true, then we have anticipated that it might spawn its own child processes, so we've given it a process group ID (PGID) equal to its process id (PID) and given its child processes will inherit the PGID, we can kill that group, rather than killing the process itself.
268-
func Kill(cmd *exec.Cmd) error {
269-
return kill.Kill(cmd)
270-
}
271-
272-
// PrepareForChildren sets Setpgid to true on the cmd, so that when we run it as a subprocess, we can kill its group rather than the process itself. This is because some commands, like `docker-compose logs` spawn multiple children processes, and killing the parent process isn't sufficient for killing those child processes. We set the group id here, and then in subprocess.go we check if the group id is set and if so, we kill the whole group rather than just the one process.
273-
func PrepareForChildren(cmd *exec.Cmd) {
274-
kill.PrepareForChildren(cmd)
275-
}
276-
277266
func (c *OSCommand) CopyToClipboard(str string) error {
278267
escaped := strings.ReplaceAll(str, "\n", "\\n")
279268
truncated := utils.TruncateWithEllipsis(escaped, 40)

vendor/github.com/jesseduffield/kill/LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

vendor/github.com/jesseduffield/kill/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

vendor/github.com/jesseduffield/kill/kill_default_platform.go

Lines changed: 0 additions & 33 deletions
This file was deleted.

vendor/github.com/jesseduffield/kill/kill_windows.go

Lines changed: 0 additions & 174 deletions
This file was deleted.

vendor/modules.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,6 @@ github.com/jesseduffield/go-git/v5/utils/trace
230230
# github.com/jesseduffield/gocui v0.3.1-0.20250711082438-4aa4fd0b4d22
231231
## explicit; go 1.12
232232
github.com/jesseduffield/gocui
233-
# github.com/jesseduffield/kill v0.0.0-20250101124109-e216ddbe133a
234-
## explicit; go 1.18
235-
github.com/jesseduffield/kill
236233
# github.com/jesseduffield/lazycore v0.0.0-20221012050358-03d2e40243c5
237234
## explicit; go 1.18
238235
github.com/jesseduffield/lazycore/pkg/boxlayout

0 commit comments

Comments
 (0)