mirror of
https://github.com/viarotel-org/escrcpy.git
synced 2024-12-19 10:55:52 +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,
|
|
})
|