mirror of
https://github.com/mbilker/vgpu_unlock-rs.git
synced 2025-06-08 13:28:23 +02:00
Merge pull request #2 from erin-allison/master
Allow VMs to be launched when no profile_override.toml is found.
This commit is contained in:
commit
6541af70bb
@ -391,13 +391,20 @@ fn handle_profile_override(config: &mut VgpuConfig) -> bool {
|
||||
Some(path) => PathBuf::from(path),
|
||||
None => PathBuf::from(DEFAULT_PROFILE_OVERRIDE_CONFIG_PATH),
|
||||
};
|
||||
|
||||
let config_overrides = match fs::read_to_string(&config_path) {
|
||||
Ok(data) => data,
|
||||
Err(e) => {
|
||||
if e.kind() != ErrorKind::NotFound {
|
||||
error!("Config file '{}' not found", config_path.display());
|
||||
return true;
|
||||
}
|
||||
|
||||
error!("Failed to read '{}': {}", config_path.display(), e);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
let config_overrides: ProfileOverridesConfig = match toml::from_str(&config_overrides) {
|
||||
Ok(config) => config,
|
||||
Err(e) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user