Wait for sccache server to start
This commit is contained in:
Родитель
72e57f7a6b
Коммит
538da7cf0a
14
build.js
14
build.js
|
@ -6,10 +6,16 @@ const path = require('path')
|
|||
|
||||
// Make sure sccache server is up.
|
||||
const sccache = path.resolve('src', 'electron', 'external_binaries', 'sccache')
|
||||
try {
|
||||
execSync(`${sccache} --start-server`, {stdio: 'pipe'})
|
||||
} catch (e) {
|
||||
// Ignore error of sccache.
|
||||
while (true) {
|
||||
try {
|
||||
execSync(`${sccache} -s`, {stdio: 'pipe'})
|
||||
break
|
||||
} catch (e) {
|
||||
if (!e.message.includes('error: Connection to server timed out') &&
|
||||
!e.message.includes('error: failed to get stats from server')) {
|
||||
throw e
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The configuration to build.
|
||||
|
|
Загрузка…
Ссылка в новой задаче