escrcpy/electron/exposes/scrcpy/index.js
2023-10-17 15:27:08 +08:00

13 lines
331 B
JavaScript

import util from 'node:util'
import child_process from 'node:child_process'
import { adbPath, scrcpyPath } from '@electron/configs/index.js'
const exec = util.promisify(child_process.exec)
const shell = command =>
exec(`${scrcpyPath} ${command}`, { env: { ...process.env, ADB: adbPath } })
export default () => ({
shell,
})