mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
doctor: use os.uname().machine, on incomplete CPU info; display os.getwd() too
This commit is contained in:
parent
06eaded6ea
commit
793f9ae9e3
@ -36,11 +36,17 @@ fn (mut a App) collect_info() {
|
||||
}
|
||||
if os_kind == 'linux' {
|
||||
info := a.cpu_info()
|
||||
if info['model name'] != '' {
|
||||
arch_details << info['model name']
|
||||
} else {
|
||||
arch_details << info['hardware']
|
||||
mut cpu_details := ''
|
||||
if cpu_details == '' {
|
||||
cpu_details = info['model name']
|
||||
}
|
||||
if cpu_details == '' {
|
||||
cpu_details = info['hardware']
|
||||
}
|
||||
if cpu_details == '' {
|
||||
cpu_details = os.uname().machine
|
||||
}
|
||||
arch_details << cpu_details
|
||||
}
|
||||
if os_kind == 'windows' {
|
||||
arch_details << a.cmd({
|
||||
@ -104,6 +110,7 @@ fn (mut a App) collect_info() {
|
||||
command: 'cc --version'
|
||||
}))
|
||||
a.println('')
|
||||
a.line('getwd', os.getwd())
|
||||
vexe := os.getenv('VEXE')
|
||||
vroot := os.dir(vexe)
|
||||
os.chdir(vroot)
|
||||
|
Loading…
Reference in New Issue
Block a user