Skip to content

Commit

Permalink
Fix #399 (#400)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cretezy authored and dolezel committed Feb 25, 2019
1 parent 74a3fc8 commit 2ca33bd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/migration.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,14 @@ module.exports = class Migration {

// copy the default migration template to the new file location
// eslint-disable-next-line security/detect-non-literal-fs-filename
fs.createReadStream(
path.resolve(__dirname, `./migration-template.${suffix}`)
// eslint-disable-next-line security/detect-non-literal-fs-filename
).pipe(fs.createWriteStream(newFile));
await new Promise(resolve => {
fs.createReadStream(
path.resolve(__dirname, `./migration-template.${suffix}`)
)
// eslint-disable-next-line security/detect-non-literal-fs-filename
.pipe(fs.createWriteStream(newFile))
.on("end", resolve);
});

return new Migration(null, newFile);
}
Expand Down

0 comments on commit 2ca33bd

Please sign in to comment.