Skip to content

Commit fd30c7e

Browse files
authored
Merge pull request #298 from mrmlnc/ISSUE-281_guards
ISSUE-281: additional comment after PR
2 parents 800aea6 + a78cab6 commit fd30c7e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/settings.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ import * as os from 'os';
33

44
import { FileSystemAdapter, Pattern } from './types';
55

6+
/**
7+
* The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
8+
* https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107
9+
*/
610
const CPU_COUNT = Math.max(os.cpus().length, 1);
711

812
export const DEFAULT_FILE_SYSTEM_ADAPTER: FileSystemAdapter = {

0 commit comments

Comments
 (0)