mirror of
https://github.com/viarotel-org/escrcpy.git
synced 2024-11-15 11:23:22 +01:00
14 lines
386 B
JavaScript
14 lines
386 B
JavaScript
import util from 'node:util'
|
|
import child_process from 'node:child_process'
|
|
import adbPath from '@resources/extra/core/adb.exe?path'
|
|
import scrcpyPath from '@resources/extra/core/scrcpy.exe?path'
|
|
|
|
const exec = util.promisify(child_process.exec)
|
|
|
|
const shell = command =>
|
|
exec(`${scrcpyPath} ${command}`, { env: { ...process.env, ADB: adbPath } })
|
|
|
|
export default () => ({
|
|
shell,
|
|
})
|