Latest
This commit is contained in:
parent
f07bbaa8bc
commit
fb7ee86627
1 changed files with 3 additions and 2 deletions
|
@ -42,8 +42,9 @@ async function runScript(key, script) {
|
||||||
fs.writeFileSync(`${cacheDir}/${key}`, templatedScript.stdout)
|
fs.writeFileSync(`${cacheDir}/${key}`, templatedScript.stdout)
|
||||||
try {
|
try {
|
||||||
runSilentCommand(`glow --width 140 "${cacheDir}/${key}-glow"`)
|
runSilentCommand(`glow --width 140 "${cacheDir}/${key}-glow"`)
|
||||||
if (process.env.DEBUG) {
|
// TODO: Set process.env.DEBUG || true here because the asynchronous method is not logging properly / running slow
|
||||||
runSilentCommand(`bash "${cacheDir}/${key}" || logg error 'Error occurred while processing script for ${key}'`)
|
if (process.env.DEBUG || true) {
|
||||||
|
return runSilentCommand(`bash "${cacheDir}/${key}" || logg error 'Error occurred while processing script for ${key}'`)
|
||||||
} else {
|
} else {
|
||||||
return $`bash "${cacheDir}/${key}" || logg error 'Error occurred while processing script for ${key}'`.pipe(process.stdout)
|
return $`bash "${cacheDir}/${key}" || logg error 'Error occurred while processing script for ${key}'`.pipe(process.stdout)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue