Fix set_system_proxy when using sudo

This commit is contained in:
世界
2022-07-15 18:22:09 +08:00
parent 8969a15858
commit a25db09aac
2 changed files with 26 additions and 11 deletions

View File

@@ -3,13 +3,9 @@ package settings
import (
"os"
"os/exec"
"strings"
"github.com/sagernet/sing-box/log"
)
func runCommand(name string, args ...string) error {
log.Debug(name, " ", strings.Join(args, " "))
command := exec.Command(name, args...)
command.Env = os.Environ()
command.Stdin = os.Stdin