tools: fix v doctor output for missing cc. Add a diagnostic line checking for emcc --version too

This commit is contained in:
Delyan Angelov 2024-11-06 13:12:22 +02:00
parent 0585d96495
commit 399159ff79
No known key found for this signature in database
GPG key ID: 66886C0F12D595ED

View file

@ -122,8 +122,8 @@ fn (mut a App) collect_info() {
a.line('Git vroot status', a.git_info()) a.line('Git vroot status', a.git_info())
a.line('.git/config present', os.is_file('.git/config').str()) a.line('.git/config present', os.is_file('.git/config').str())
a.println('') a.println('')
a.line('CC version', a.cmd(command: 'cc --version')) a.line('CC version', a.cmd(command: 'cc --version'))
a.line('emcc version', a.cmd(command: 'emcc --version'))
a.report_tcc_version('thirdparty/tcc') a.report_tcc_version('thirdparty/tcc')
} }
@ -134,7 +134,7 @@ struct CmdConfig {
fn (mut a App) cmd(c CmdConfig) string { fn (mut a App) cmd(c CmdConfig) string {
x := os.execute(c.command) x := os.execute(c.command)
if x.exit_code < 0 { if x.exit_code < 0 || x.exit_code == 127 {
return 'N/A' return 'N/A'
} }
if x.exit_code == 0 { if x.exit_code == 0 {