mirror of
https://github.com/vlang/v.git
synced 2025-09-13 09:25:45 -04:00
doctor: ignore # comments in /etc/os-release files too
This commit is contained in:
parent
fe8cf19a8f
commit
1ee0939f69
@ -130,10 +130,18 @@ fn (mut a App) get_linux_os_name() string {
|
|||||||
}
|
}
|
||||||
mut vals := map[string]string
|
mut vals := map[string]string
|
||||||
for line in lines {
|
for line in lines {
|
||||||
x := line.split('=')
|
sline := line.trim(' ')
|
||||||
if x.len > 1 {
|
if sline.len == 0 {
|
||||||
vals[x[0]] = x[1].trim('"')
|
continue
|
||||||
}
|
}
|
||||||
|
if sline[0] == `#` {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
x := sline.split('=')
|
||||||
|
if x.len < 2 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
vals[x[0]] = x[1].trim('"')
|
||||||
}
|
}
|
||||||
if vals['PRETTY_NAME'] == '' {
|
if vals['PRETTY_NAME'] == '' {
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user