mirror of
https://github.com/orhun/systeroid
synced 2024-07-22 02:45:19 +00:00
fix(app): use the value of --docs
argument while parsing
This commit is contained in:
parent
b8f871c8bd
commit
81e3fc8fa7
|
@ -43,13 +43,12 @@ impl<'a> App<'a> {
|
|||
if let Some(path) = kernel_docs {
|
||||
kernel_docs_path.insert(0, path);
|
||||
}
|
||||
for path in KERNEL_DOCS_PATH.iter() {
|
||||
if path.exists() {
|
||||
return self.sysctl.update_docs(path);
|
||||
}
|
||||
if let Some(path) = kernel_docs_path.iter().find(|path| path.exists()) {
|
||||
self.sysctl.update_docs(path)
|
||||
} else {
|
||||
eprintln!("warning: `Linux kernel documentation cannot be found. Please specify a path via '-d' argument`",);
|
||||
Ok(())
|
||||
}
|
||||
eprintln!("warning: `Linux kernel documentation cannot be found. Please specify a path via '-d' argument`",);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Displays the documentation of a parameter.
|
||||
|
|
Loading…
Reference in a new issue