Skip to content

Commit 33a485f

Browse files
authored
fix(cargo-shuttle): clashing id arg name in logs, deployment status, redeploy (#2089)
1 parent 2d536f4 commit 33a485f

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

cargo-shuttle/src/args.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,12 @@ pub enum DeploymentCommand {
214214
#[command(visible_alias = "stat")]
215215
Status {
216216
/// ID of deployment to get status for
217-
id: Option<String>,
217+
deployment_id: Option<String>,
218218
},
219219
/// Redeploy a previous deployment (if possible)
220220
Redeploy {
221221
/// ID of deployment to redeploy
222-
id: Option<String>,
222+
deployment_id: Option<String>,
223223

224224
#[command(flatten)]
225225
tracking_args: DeploymentTrackingArgs,
@@ -516,7 +516,7 @@ impl InitTemplateArg {
516516
#[derive(Args, Clone, Debug, Default)]
517517
pub struct LogsArgs {
518518
/// Deployment ID to get logs for. Defaults to the current deployment
519-
pub id: Option<String>,
519+
pub deployment_id: Option<String>,
520520
#[arg(short, long)]
521521
/// View logs from the most recent deployment (which is not always the running one)
522522
pub latest: bool,

cargo-shuttle/src/lib.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,13 @@ impl Shuttle {
265265
DeploymentCommand::List { page, limit, table } => {
266266
self.deployments_list(page, limit, table).await
267267
}
268-
DeploymentCommand::Status { id } => self.deployment_get(id).await,
269-
DeploymentCommand::Redeploy { id, tracking_args } => {
270-
self.deployment_redeploy(id, tracking_args).await
268+
DeploymentCommand::Status { deployment_id } => {
269+
self.deployment_get(deployment_id).await
271270
}
271+
DeploymentCommand::Redeploy {
272+
deployment_id,
273+
tracking_args,
274+
} => self.deployment_redeploy(deployment_id, tracking_args).await,
272275
DeploymentCommand::Stop { tracking_args } => self.stop(tracking_args).await,
273276
},
274277
Command::Resource(cmd) => match cmd {
@@ -997,7 +1000,7 @@ impl Shuttle {
9971000
};
9981001
eprintln!("Getting logs from: {}", most_recent.id);
9991002
most_recent.id
1000-
} else if let Some(id) = args.id {
1003+
} else if let Some(id) = args.deployment_id {
10011004
id
10021005
} else {
10031006
let Some(current) = client.get_current_deployment(pid).await?.into_inner() else {

0 commit comments

Comments
 (0)