fix: Lets await!

This commit is contained in:
Andras Bacsai
2022-04-03 22:53:11 +02:00
parent c36bd34a1a
commit 53947d805b
5 changed files with 20 additions and 12 deletions

View File

@@ -88,12 +88,12 @@ export async function buildImage({
debug = false
}) {
if (isCache) {
saveBuildLog({ line: `Building cache image started.`, buildId, applicationId });
await saveBuildLog({ line: `Building cache image started.`, buildId, applicationId });
} else {
saveBuildLog({ line: `Building image started.`, buildId, applicationId });
await saveBuildLog({ line: `Building image started.`, buildId, applicationId });
}
if (!debug && isCache) {
saveBuildLog({
await saveBuildLog({
line: `Debug turned off. To see more details, allow it in the configuration.`,
buildId,
applicationId
@@ -132,7 +132,11 @@ export async function streamEvents({ stream, docker, buildId, applicationId, deb
} else if (event.stream) {
if (event.stream !== '\n') {
if (debug)
saveBuildLog({ line: `${event.stream.replace('\n', '')}`, buildId, applicationId });
await saveBuildLog({
line: `${event.stream.replace('\n', '')}`,
buildId,
applicationId
});
}
}
}