diff --git a/espflash/src/cli/mod.rs b/espflash/src/cli/mod.rs index 3009c3f9..bdc89d37 100644 --- a/espflash/src/cli/mod.rs +++ b/espflash/src/cli/mod.rs @@ -89,21 +89,10 @@ pub struct FlashArgs { #[arg(long, value_name = "FILE")] pub bootloader: Option, /// Erase partitions by label - #[arg( - long, - requires = "partition_table", - value_name = "LABELS", - value_delimiter = ',' - )] + #[arg(long, value_name = "LABELS", value_delimiter = ',')] pub erase_parts: Option>, /// Erase specified data partitions - #[arg( - long, - requires = "partition_table", - value_name = "PARTS", - value_enum, - value_delimiter = ',' - )] + #[arg(long, value_name = "PARTS", value_enum, value_delimiter = ',')] pub erase_data_parts: Option>, /// Image format to flash #[arg(long, value_enum)] diff --git a/espflash/src/error.rs b/espflash/src/error.rs index a4e30129..b76518f7 100644 --- a/espflash/src/error.rs +++ b/espflash/src/error.rs @@ -387,8 +387,11 @@ impl From for MissingPartition { } #[derive(Debug, Error, Diagnostic)] -#[error("No partition table could be found at the specified path")] -#[diagnostic(code(espflash::partition_table::missing_partition_table))] +#[error("No partition table could be found")] +#[diagnostic( + code(espflash::partition_table::missing_partition_table), + help("Try providing a CSV or binary paritition table with the `--partition-table` argument.") +)] pub struct MissingPartitionTable; #[derive(Debug, Error)]