mirror of
https://github.com/viarotel-org/escrcpy.git
synced 2024-11-15 03:07:41 +01:00
fix: 🐛 Abnormal built-in terminal adb command
This commit is contained in:
parent
bf2d2b47b4
commit
368551a954
@ -7,7 +7,18 @@ export function useAdb({ loading }) {
|
||||
loading.value = true
|
||||
const command = args.slice(1).join(' ')
|
||||
|
||||
const { stderr, stdout } = await $adb.shell(command || 'help')
|
||||
let stderr
|
||||
let stdout
|
||||
|
||||
try {
|
||||
const res = await $adb.shell(command || 'help')
|
||||
|
||||
stdout = res?.stdout
|
||||
stderr = res?.stderr
|
||||
}
|
||||
catch (error) {
|
||||
stderr = error?.message || JSON.stringify(error) || 'Command failed'
|
||||
}
|
||||
|
||||
if (stderr) {
|
||||
return createStderr(stderr)
|
||||
|
@ -45,7 +45,7 @@ import VueCommand, {
|
||||
listFormatter,
|
||||
} from 'vue-command'
|
||||
import 'vue-command/dist/vue-command.css'
|
||||
import { useAdb } from './composables/adb.js'
|
||||
import { useAdb } from './composables/adb-async.js'
|
||||
import { useScrcpy } from './composables/scrcpy.js'
|
||||
import { useGnirehtet } from './composables/gnirehtet.js'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user