Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion functions/imagemagick/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ const blurImage = async (file, blurredBucketName) => {
}

// Delete the temporary file.
return promisify(fs.unlink(tempLocalPath));
const unlink = promisify(fs.unlink);
return unlink(tempLocalPath);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume return promisify(fs.unlink)(tempLocalPath) is either too complex or doesn't work here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test that, but it seems likely to work.
My reasoning is that this is more explicit, happy to change if you prefer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like explicit samples 👍

};
// [END functions_imagemagick_blur]