Improve CPU core detection in Vagrantfile

Use single `grep` with `^` condition instead of `grep` + `cat` + `wc`
This commit is contained in:
Peter Dave Hello 2018-04-16 15:11:20 +08:00
parent 315564ae94
commit 5b7a5cc73a

2
Vagrantfile vendored
View file

@ -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