Skip to content

Commit

Permalink
fix adb when no adb.exe in path
Browse files Browse the repository at this point in the history
  • Loading branch information
Teages committed May 12, 2023
1 parent c1497ab commit 6add61c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion server/internal/adb/adb.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ func Exec(args ...string) {
func init() {
Exec("start-server")
a, err := adb.NewWithConfig(adb.ServerConfig{
Port: *flag.Int("p", adb.AdbPort, ""),
PathToAdb: adbPath,
Port: *flag.Int("p", adb.AdbPort, ""),
})
if logger.Catch(err) {
logger.Error("Can't start ADB server")
Expand Down
2 changes: 1 addition & 1 deletion server/internal/adb/adb_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ var (
adbFiles embed.FS
adbPath = func() string {
vfile.JoinPart("libs/adb", "windows", adbFiles)
return vfile.GetPath("libs/adb/adb")
return vfile.GetPath("libs/adb/adb.exe")
}()
)

0 comments on commit 6add61c

Please sign in to comment.