neue Optionen (-r, Installskript) installiert
This commit is contained in:
parent
0bab728d62
commit
d78e318d8a
15 changed files with 273 additions and 42 deletions
|
|
@ -57,6 +57,19 @@ impl Config {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Lädt Konfiguration aus spezifischer Datei (fehlschlägt bei nicht-existierender Datei)
|
||||
pub fn from_file(path: &Path, verbose: bool) -> Result<Self> {
|
||||
if !path.exists() {
|
||||
return Err(anyhow::anyhow!(
|
||||
"Konfigurationsdatei nicht gefunden: {}",
|
||||
path.display()
|
||||
));
|
||||
}
|
||||
|
||||
Self::load_internal(path, verbose)
|
||||
}
|
||||
|
||||
/// Sucht nach Konfigurationsdateien in verschiedenen Orten und kombiniert sie
|
||||
pub fn from_default_locations(verbose: bool) -> Result<Self> {
|
||||
// Prioritätenreihenfolge (später überschreibt früher):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue