Files
sing-box-extended-mirror/cmd/sing-box/cmd_api_tailscale_ssh_windows.go
2026-08-30 17:41:45 +08:00

21 lines
366 B
Go

package main
import (
"errors"
"os"
"os/exec"
)
func executeSSH(path string, argv []string) error {
command := exec.Command(path, argv[1:]...)
command.Stdin = os.Stdin
command.Stdout = os.Stdout
command.Stderr = os.Stderr
err := command.Run()
var exitError *exec.ExitError
if errors.As(err, &exitError) {
os.Exit(exitError.ExitCode())
}
return err
}