Skip to content

Commit

Permalink
fix: delete useless plafrom condition (#35)
Browse files Browse the repository at this point in the history
* fix: optimize the algorithm for cpu count calculation in the linux plaform

* fix: delete useless plafrom condition

* style: delete useless comments
  • Loading branch information
beita1 authored Jul 6, 2022
1 parent 9783b07 commit 2bcae28
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/physicalCpuCount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ try {
} else if (platform === 'darwin') {
const output = exec('sysctl -n hw.physicalcpu_max')
amount = parseInt(output.trim(), 10)
// @ts-ignore
} else if (platform === 'windows' || platform === 'win32') {
} else if (platform === 'win32') {
// windows takes too long, so let's drop the support
throw new Error()
} else {
Expand Down

0 comments on commit 2bcae28

Please sign in to comment.