mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 21:05:48 +02: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:
parent
5c78394299
commit
975d2bedb6
25 changed files with 40 additions and 341 deletions
|
@ -27,7 +27,8 @@ func TestCmdObjToString(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, scenario := range scenarios {
|
||||
cmdObj := &CmdObj{args: scenario.cmdArgs}
|
||||
cmd := exec.Command(scenario.cmdArgs[0], scenario.cmdArgs[1:]...)
|
||||
cmdObj := &CmdObj{cmd: cmd}
|
||||
actual := cmdObj.ToString()
|
||||
if actual != scenario.expected {
|
||||
t.Errorf("Expected %s, got %s", quote(scenario.expected), quote(actual))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue