Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cargo-shuttle): cargo shuttle clean response type #1409

Merged
merged 1 commit into from Nov 21, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cargo-shuttle/src/client.rs
Expand Up @@ -140,7 +140,7 @@ impl Client {
.await
}

pub async fn clean_project(&self, project: &str) -> Result<Vec<String>> {
pub async fn clean_project(&self, project: &str) -> Result<String> {
let path = format!("/projects/{project}/clean");

self.post(path, Option::<String>::None)
Expand Down
9 changes: 2 additions & 7 deletions cargo-shuttle/src/lib.rs
Expand Up @@ -633,7 +633,7 @@ impl Shuttle {

async fn clean(&self) -> Result<CommandOutcome> {
let client = self.client.as_ref().unwrap();
let lines = client
let message = client
.clean_project(self.ctx.project_name())
.await
.map_err(|err| {
Expand All @@ -644,12 +644,7 @@ impl Shuttle {
"cleaning your project or checking its status fail repeatedly",
)
})?;

for line in lines {
println!("{line}");
}

println!("Cleaning done!");
println!("{message}");

Ok(CommandOutcome::Ok)
}
Expand Down