Add a flag for non-removable devices (fix #24)

This commit is contained in:
Roey Darwish Dror
2019-08-13 21:43:55 +03:00
parent 25cdc44c7c
commit 750653c222
8 changed files with 56 additions and 25 deletions

View File

@@ -60,9 +60,16 @@ pub struct CreateCommand {
)]
pub image: Option<Byte>,
/// Overwrite existing image files. Use with caution
/// Overwrite existing image files. Use with caution!
#[structopt(long = "overwrite")]
pub overwrite: bool,
/// Allow installation on non-removable devices. Use with extreme caution!
///
/// If no device is specified in the command line, the device selection menu will
/// show non-removable devices
#[structopt(long = "allow-non-removable")]
pub allow_non_removable: bool,
}
#[derive(StructOpt)]
@@ -71,6 +78,10 @@ pub struct ChrootCommand {
#[structopt(parse(from_os_str))]
pub block_device: PathBuf,
/// Allow installation on non-removable devices. Use with extreme caution!
#[structopt(long = "allow-non-removable")]
pub allow_non_removable: bool,
/// Optional command to run
#[structopt()]
pub command: Vec<String>,