Skip to content

Commit 7e8c847

Browse files
committed
feat: add pull as download alias
1 parent cba96fb commit 7e8c847

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

xtask/src/image.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
//! xtask image ls
1414
//! // Download a specific image and automatically extract it
1515
//! xtask image download evm3588_arceos --output-dir ./images
16-
//! // Download a specific image without extracting
17-
//! xtask image download evm3588_arceos --output-dir ./images --no-extract
16+
//! // Pull a specific image (alias for download) and automatically extract it
17+
//! xtask image pull evm3588_arceos --output-dir ./images
1818
//! // Remove a specific image from temp directory
1919
//! xtask image rm evm3588_arceos
2020
//! ```
@@ -42,6 +42,7 @@ pub enum ImageCommands {
4242
/// List all available image
4343
Ls,
4444
/// Download the specified image and automatically extract it
45+
#[command(alias = "pull")]
4546
Download {
4647
image_name: String,
4748
#[arg(short, long)]
@@ -277,8 +278,8 @@ fn image_list() -> Result<()> {
277278
/// ```
278279
/// // Download the evm3588_arceos image to the ./images directory and automatically extract it
279280
/// xtask image download evm3588_arceos --output-dir ./images
280-
/// // Download the evm3588_arceos image to the ./images directory without extracting
281-
/// xtask image download evm3588_arceos --output-dir ./images --no-extract
281+
/// // Or use the pull alias
282+
/// xtask image pull evm3588_arceos --output-dir ./images
282283
/// ```
283284
fn image_download(image_name: &str, output_dir: Option<String>, extract: bool) -> Result<()> {
284285
let image = Image::find_by_name(image_name)
@@ -458,7 +459,8 @@ fn image_remove(image_name: &str) -> Result<()> {
458459
/// // Run image management commands
459460
/// xtask image ls
460461
/// xtask image download evm3588_arceos --output-dir ./images
461-
/// xtask image download evm3588_arceos --output-dir ./images --no-extract
462+
/// // Or use the pull alias
463+
/// xtask image pull evm3588_arceos --output-dir ./images
462464
/// xtask image rm evm3588_arceos
463465
/// ```
464466
pub fn run_image(args: ImageArgs) -> Result<()> {

0 commit comments

Comments
 (0)