Exit on completion
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2022-10-05 13:26:18 +02:00
parent 6f8e2c8e79
commit 726b2d5eb2
2 changed files with 10 additions and 3 deletions

View File

@ -60,7 +60,8 @@ async function test() {
helpers: [],
});
jasmine.exitOnCompletion = false;
if (!isCI) jasmine.exitOnCompletion = false;
await jasmine.execute();
if (app) await app.disconnect();
if (container) await container.rm();

View File

@ -62,8 +62,14 @@ module.exports = Self => {
name: fileName
};
await fs.access(file.path);
let stream = fs.createReadStream(file.path);
try {
await fs.access(file.path);
} catch (error) {
await Self.createPdf(ctx, id);
}
const stream = fs.createReadStream(file.path);
return [stream, file.contentType, `filename="${file.name}"`];
} catch (error) {
if (error.code === 'ENOENT')