From f22c2690ec8e152408d3e9b9ab59cfa7751c2c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Wed, 17 Aug 2022 20:15:35 +0800 Subject: [PATCH] Fix lint --- Makefile | 1 + common/settings/proxy_android.go | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9c062060..2c621610 100644 --- a/Makefile +++ b/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 ./... diff --git a/common/settings/proxy_android.go b/common/settings/proxy_android.go index 16c3005f..45306b34 100644 --- a/common/settings/proxy_android.go +++ b/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() } }