Update migrate.ts

This commit is contained in:
syuilo 2019-04-09 01:42:07 +09:00
parent 8bec4042fc
commit 38ffbe95e9
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -80,7 +80,7 @@ async function main() {
const bucket = await getDriveFileBucket();
const readable = bucket.openDownloadStream(file._id);
const dest = fs.createWriteStream(temp);
readable.on('data', chunk => dest.write(chunk));
readable.pipe(dest);
readable.on('end', () => {
dest.end();
res();