mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Remove secureexec package
From the go 1.19 release notes: Command and LookPath no longer allow results from a PATH search to be found relative to the current directory. This removes a common source of security problems but may also break existing programs that depend on using, say, exec.Command("prog") to run a binary named prog (or, on Windows, prog.exe) in the current directory. See the os/exec package documentation for information about how best to update such programs.
This commit is contained in:
@ -11,7 +11,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/jesseduffield/gocui"
|
||||
"github.com/jesseduffield/lazygit/pkg/secureexec"
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
)
|
||||
|
||||
@ -46,7 +45,7 @@ func TestNewCmdTaskInstantStop(t *testing.T) {
|
||||
reader := bytes.NewBufferString("test")
|
||||
start := func() (*exec.Cmd, io.Reader) {
|
||||
// not actually starting this because it's not necessary
|
||||
cmd := secureexec.Command("blah blah")
|
||||
cmd := exec.Command("blah")
|
||||
|
||||
close(stop)
|
||||
|
||||
@ -111,7 +110,7 @@ func TestNewCmdTask(t *testing.T) {
|
||||
reader := bytes.NewBufferString("test")
|
||||
start := func() (*exec.Cmd, io.Reader) {
|
||||
// not actually starting this because it's not necessary
|
||||
cmd := secureexec.Command("blah blah")
|
||||
cmd := exec.Command("blah")
|
||||
|
||||
return cmd, reader
|
||||
}
|
||||
@ -246,7 +245,7 @@ func TestNewCmdTaskRefresh(t *testing.T) {
|
||||
reader := BlankLineReader{totalLinesToYield: s.totalTaskLines}
|
||||
start := func() (*exec.Cmd, io.Reader) {
|
||||
// not actually starting this because it's not necessary
|
||||
cmd := secureexec.Command("blah blah")
|
||||
cmd := exec.Command("blah")
|
||||
|
||||
return cmd, &reader
|
||||
}
|
||||
|
Reference in New Issue
Block a user