mirror of
https://github.com/viarotel-org/escrcpy.git
synced 2025-01-18 17:14:10 +01:00
perf: 🚨 Optimization error prompt
This commit is contained in:
parent
76f888baf6
commit
b75950298f
@ -68,11 +68,11 @@ const spawnShell = async (command, { stdout, stderr } = {}) => {
|
||||
}
|
||||
})
|
||||
|
||||
let lastStderr = ''
|
||||
const stderrList = []
|
||||
spawnProcess.stderr.on('data', (data) => {
|
||||
const stringData = data.toString()
|
||||
|
||||
lastStderr = stringData
|
||||
stderrList.push(stringData)
|
||||
|
||||
console.error('spawnProcess.stderr.data:', stringData)
|
||||
|
||||
@ -87,7 +87,9 @@ const spawnShell = async (command, { stdout, stderr } = {}) => {
|
||||
resolve()
|
||||
}
|
||||
else {
|
||||
reject(new Error(lastStderr || `Command failed with code ${code}`))
|
||||
reject(
|
||||
new Error(stderrList.join(',') || `Command failed with code ${code}`),
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -46,11 +46,11 @@ const shell = async (command, { debug = false, stdout, stderr } = {}) => {
|
||||
}
|
||||
})
|
||||
|
||||
let lastStderr = ''
|
||||
const stderrList = []
|
||||
gnirehtetProcess.stderr.on('data', (data) => {
|
||||
const stringData = data.toString()
|
||||
|
||||
lastStderr = stringData
|
||||
stderrList.push(stringData)
|
||||
|
||||
if (debug) {
|
||||
console.error(`${command}.gnirehtet.process.stderr.data:`, stringData)
|
||||
@ -69,7 +69,9 @@ const shell = async (command, { debug = false, stdout, stderr } = {}) => {
|
||||
resolve()
|
||||
}
|
||||
else {
|
||||
reject(new Error(`Command failed with code ${code}`))
|
||||
reject(
|
||||
new Error(stderrList.join(',') || `Command failed with code ${code}`),
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -33,11 +33,11 @@ const shell = async (command, { stdout, stderr } = {}) => {
|
||||
}
|
||||
})
|
||||
|
||||
let lastStderr = ''
|
||||
const stderrList = []
|
||||
scrcpyProcess.stderr.on('data', (data) => {
|
||||
const stringData = data.toString()
|
||||
|
||||
lastStderr = stringData
|
||||
stderrList.push(stringData)
|
||||
|
||||
console.error('scrcpyProcess.stderr.data:', stringData)
|
||||
|
||||
@ -52,7 +52,9 @@ const shell = async (command, { stdout, stderr } = {}) => {
|
||||
resolve()
|
||||
}
|
||||
else {
|
||||
reject(new Error(lastStderr || `Command failed with code ${code}`))
|
||||
reject(
|
||||
new Error(stderrList.join(',') || `Command failed with code ${code}`),
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user