diff --git a/index.js b/index.js index 0c67c66..c403d9a 100644 --- a/index.js +++ b/index.js @@ -136,7 +136,7 @@ const renameFile = (source, rename) => { export default function cpy( source, destination, - {concurrency = os.availableParallelism(), ...options} = {}, + {concurrency = os.availableParallelism?.() ?? os.cpus().length, ...options} = {}, ) { const copyStatus = new Map();