Skip to content

Commit

Permalink
fix: fallback to os.cpu when os.availableParallelism missing
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-pousette committed Apr 2, 2024
1 parent 622d814 commit 0158bd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 0158bd1

Please sign in to comment.