Interactive device selection

This commit is contained in:
Roey Darwish Dror
2019-06-06 15:19:02 +03:00
parent 4f7b834ce3
commit 4b7547a57e
7 changed files with 217 additions and 68 deletions

View File

@@ -33,7 +33,7 @@ pub enum Command {
pub struct CreateCommand {
/// Either a path to a removable block device or a nonexiting file if --image is specified
#[structopt(parse(from_os_str))]
pub path: PathBuf,
pub path: Option<PathBuf>,
/// Additional pacakges to install
#[structopt(short = "p", long = "extra-packages", value_name = "package")]
@@ -55,7 +55,8 @@ pub struct CreateCommand {
#[structopt(
long = "image",
parse(try_from_str = "parse_bytes"),
value_name = "size"
value_name = "size",
requires = "path"
)]
pub image: Option<Byte>,
}