mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Improve CPU core detection in Vagrantfile
Use single `grep` with `^` condition instead of `grep` + `cat` + `wc`
This commit is contained in:
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user