世界 3 年之前
父节点
当前提交
f22c2690ec
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 1 0
      Makefile
  2. 3 2
      common/settings/proxy_android.go

+ 1 - 0
Makefile

@@ -25,6 +25,7 @@ fmt_install:
 
 lint:
 	GOOS=linux golangci-lint run ./...
+	GOOS=android golangci-lint run ./...
 	GOOS=windows golangci-lint run ./...
 	GOOS=darwin golangci-lint run ./...
 	GOOS=freebsd golangci-lint run ./...

+ 3 - 2
common/settings/proxy_android.go

@@ -6,6 +6,7 @@ import (
 
 	"github.com/sagernet/sing-box/adapter"
 	C "github.com/sagernet/sing-box/constant"
+	"github.com/sagernet/sing/common"
 	F "github.com/sagernet/sing/common/format"
 )
 
@@ -25,9 +26,9 @@ func init() {
 
 func runAndroidShell(name string, args ...string) error {
 	if !useRish {
-		return runCommand(name, args...)
+		return common.Exec(name, args...).Attach().Run()
 	} else {
-		return runCommand("sh", rishPath, "-c", F.ToString(name, " ", strings.Join(args, " ")))
+		return common.Exec("sh", rishPath, "-c", F.ToString(name, " ", strings.Join(args, " "))).Attach().Run()
 	}
 }