avoid doAssert on contents of osReleaseFile (#16955)
This commit is contained in:
parent
35bd39a9d0
commit
55722fe04d
1 changed files with 1 additions and 1 deletions
|
|
@ -120,7 +120,7 @@ proc osReleaseFile*(): Config {.since: (1, 5).} =
|
||||||
import parsecfg
|
import parsecfg
|
||||||
when defined(linux):
|
when defined(linux):
|
||||||
let data = osReleaseFile()
|
let data = osReleaseFile()
|
||||||
doAssert data.getSectionValue("", "NAME").len > 0 ## the data is up to each distro.
|
echo "OS name: ", data.getSectionValue("", "NAME") ## the data is up to each distro.
|
||||||
|
|
||||||
# We do not use a {.strdefine.} because Standard says it *must* be that path.
|
# We do not use a {.strdefine.} because Standard says it *must* be that path.
|
||||||
for osReleaseFile in ["/etc/os-release", "/usr/lib/os-release"]:
|
for osReleaseFile in ["/etc/os-release", "/usr/lib/os-release"]:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue