diff options
| author | ruki <[email protected]> | 2021-04-06 22:32:41 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-04-06 22:32:41 +0800 |
| commit | 723d07ceb2e1ca829f0fd768a01e84fdc40c6567 (patch) | |
| tree | 2613625053d34593d745f8056c97ebd49bbb7589 | |
| parent | 815553f6850001c1f5eb23f64453a5efd9bf517d (diff) | |
add model name for bsd
| -rw-r--r-- | xmake/core/base/cpu.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/core/base/cpu.lua b/xmake/core/base/cpu.lua index fe9bf9a70..4e93feccd 100644 --- a/xmake/core/base/cpu.lua +++ b/xmake/core/base/cpu.lua @@ -246,7 +246,10 @@ function cpu._info() if cpuinfo.cpu_features then cpuinfo.cpu_features = cpuinfo.cpu_features:lower():gsub(",", " ") end - cpuinfo.model_name = os.iorun("sysctl -n hw.model") + local ok, cpu_model_name = os.iorun("sysctl -n hw.model") + if ok and cpu_model_name then + cpuinfo.cpu_model_name = cpu_model_name + end end end cpu._CPUINFO = cpuinfo |
