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 07cbe23b8c
commit dfc28f4813

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