Add an option to always suspend vagrant boxes

This commit is contained in:
Roey Darwish Dror
2020-06-13 07:44:53 +03:00
parent 73a66e78b0
commit bb9c884f81
2 changed files with 17 additions and 4 deletions

View File

@@ -91,6 +91,7 @@ pub struct Git {
pub struct Vagrant {
directories: Option<Vec<String>>,
power_on: Option<bool>,
always_suspend: Option<bool>,
}
#[derive(Deserialize, Default, Debug)]
@@ -518,6 +519,14 @@ impl Config {
.and_then(|vagrant| vagrant.directories.as_ref())
}
/// Always suspend vagrant boxes instead of powering off
pub fn vagrant_always_suspend(&self) -> Option<bool> {
self.config_file
.vagrant
.as_ref()
.and_then(|vagrant| vagrant.always_suspend)
}
/// Extra yay arguments
#[allow(dead_code)]
pub fn enable_tlmgr_linux(&self) -> bool {