chore(scaffolder): fixing the issue with the scaffolder not waiting for the pull to complete before trying to run the container

This commit is contained in:
blam
2020-07-16 12:10:39 +02:00
parent 512ef406c6
commit 039ea75971
@@ -65,7 +65,7 @@ export const runDockerContainer = async ({
await new Promise((resolve, reject) => {
dockerClient.pull(imageName, {}, (err, stream) => {
if (err) return reject(err);
stream.pipe(logStream);
stream.pipe(logStream, { end: false });
stream.on('end', () => resolve());
stream.on('error', (error: Error) => reject(error));
});