Skip to content

fix: copyFile with flags#202

Closed
FeelyChau wants to merge 1 commit intoisaacs:masterfrom
FeelyChau:fix/copyFile
Closed

fix: copyFile with flags#202
FeelyChau wants to merge 1 commit intoisaacs:masterfrom
FeelyChau:fix/copyFile

Conversation

@FeelyChau
Copy link
Copy Markdown
Contributor

@FeelyChau FeelyChau commented Feb 7, 2021

If we call fs.copyFile with flags, the parameter callback misses:

const fs = require('fs-extra'); // `fs.copyFile` called grancful-fs.copyFile

async function copy(src, dest) {
   console.log('start');
  await fs.copyFile(src, dest, fs.constants.COPYFILE_FICLONE);
  console.log('end'); // never get this line
}

copy(__filename, './another-file.js');

@FeelyChau
Copy link
Copy Markdown
Contributor Author

Does the unit tests work now?

@GiladShoham
Copy link
Copy Markdown

GiladShoham commented Feb 8, 2021

If you can make a new release once this merged, it will be really great.
This fixes a serious regression.
Thanks a lot

@isaacs isaacs closed this in 195c934 Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants