Improve CPU core detection in Vagrantfile
Use single `grep` with `^` condition instead of `grep` + `cat` + `wc`
This commit is contained in:
parent
315564ae94
commit
5b7a5cc73a
|
@ -156,7 +156,7 @@ def suggestedCPUCores()
|
|||
when /darwin/
|
||||
Integer(`sysctl -n hw.ncpu`) / 2
|
||||
when /linux/
|
||||
Integer(`cat /proc/cpuinfo | grep processor | wc -l`) / 2
|
||||
Integer(`grep -c ^processor /proc/cpuinfo`) / 2
|
||||
else
|
||||
2
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue