Skip to content

Commit ff8e225

Browse files
arcanisMaël Nison
authored andcommitted
Fixes constants (#6432)
1 parent f880587 commit ff8e225

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/util/fs-normalized.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import fs from 'fs';
66
import {promisify} from './promise.js';
77

8+
import {constants} from './fs';
9+
810
export type CopyFileAction = {
911
src: string,
1012
dest: string,
@@ -37,7 +39,7 @@ export const unlink: (path: string) => Promise<void> = promisify(require('rimraf
3739
*/
3840
export const copyFile = async function(data: CopyFileAction, cleanup: () => mixed): Promise<void> {
3941
// $FlowFixMe: Flow doesn't currently support COPYFILE_FICLONE
40-
const ficloneFlag = fs.constants.COPYFILE_FICLONE || 0;
42+
const ficloneFlag = constants.COPYFILE_FICLONE || 0;
4143
try {
4244
await unlink(data.dest);
4345
await copyFilePoly(data.src, data.dest, ficloneFlag, data);

0 commit comments

Comments
 (0)