Latest
This commit is contained in:
parent
76201b8a0e
commit
41cd67e17b
1 changed files with 7 additions and 5 deletions
|
@ -396,12 +396,13 @@ async function acquireManagerList(type, command) {
|
||||||
if (fs.existsSync(`${cacheDir}/${type}`)) {
|
if (fs.existsSync(`${cacheDir}/${type}`)) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
require('child_process').exec(`${command} > ${cacheDir}/${type}`)
|
require('child_process').exec(`${command} > ${cacheDir}/${type}`)
|
||||||
}, 0)
|
}, 100)
|
||||||
} else {
|
} else {
|
||||||
require('child_process').execSync(`${command} > ${cacheDir}/${type}`)
|
require('child_process').execSync(`${command} > ${cacheDir}/${type}`)
|
||||||
}
|
}
|
||||||
return fs.readFileSync(`${cacheDir}/${type}`).toString().split('\n')
|
return fs.readFileSync(`${cacheDir}/${type}`).toString().split('\n')
|
||||||
} else {
|
} else {
|
||||||
|
log(`${type} is not installed`)
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -537,16 +538,17 @@ async function main() {
|
||||||
if (x[whenField]) {
|
if (x[whenField]) {
|
||||||
if (typeof x[whenField] === 'string') {
|
if (typeof x[whenField] === 'string') {
|
||||||
try {
|
try {
|
||||||
execSync(`${x[whenField]}`)
|
runSilentCommand(`${x[whenField]}`)
|
||||||
return false
|
|
||||||
} catch (e) {
|
|
||||||
return true
|
return true
|
||||||
|
} catch (e) {
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log(`typeof _when for ${x.listKey} must be a string`)
|
log(`typeof _when for ${x.listKey} must be a string`)
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
return true
|
return true
|
||||||
|
}
|
||||||
})
|
})
|
||||||
log(`Running installation routine`)
|
log(`Running installation routine`)
|
||||||
await installPackages(installInstructions)
|
await installPackages(installInstructions)
|
||||||
|
|
Loading…
Reference in a new issue