Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ mod list;
mod remove;
mod self_;
mod show;
mod status;
mod switch;
mod update;
mod which;
Expand Down Expand Up @@ -48,6 +49,7 @@ pub enum Commands {
Self_(self_::Command),

Show(show::Command),
Status(status::Command),
Switch(switch::Command),
Update(update::Command),
Which(which::Command),
Expand Down Expand Up @@ -80,6 +82,7 @@ impl Command {
Commands::List(cmd) => cmd.exec(github_token_ref).await,
Commands::Self_(cmd) => cmd.exec().await,
Commands::Show(cmd) => cmd.exec(),
Commands::Status(cmd) => cmd.exec(github_token_ref).await,
Commands::Switch(cmd) => cmd.exec(),
Commands::Update(cmd) => cmd.exec(github_token_ref).await,
Commands::Which(cmd) => cmd.exec(),
Expand Down
18 changes: 18 additions & 0 deletions src/commands/status.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

use anyhow::Result;
use clap::Args;

use crate::handlers::status::handle_status;

/// Check for available updates for installed binaries.
/// Use `suiup list` to see all available binaries to install.
#[derive(Args, Debug)]
pub struct Command;

impl Command {
pub async fn exec(&self, github_token: Option<&str>) -> Result<()> {
handle_status(github_token.map(str::to_owned)).await
}
}
1 change: 1 addition & 0 deletions src/handlers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pub mod install;
pub mod release;
pub mod self_;
pub mod show;
pub mod status;
pub mod update;
pub mod version;
pub mod which;
Expand Down
Loading
Loading