Skip to content

Commit 367e791

Browse files
Fix total size on CLI loading bars
1 parent aabc628 commit 367e791

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/bin/ffbuildtool.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ impl ProgressManager {
174174
pb.set_length(total);
175175
*st = ItemState::Downloading;
176176
}
177+
if pb.length().unwrap_or(0) != total {
178+
pb.set_length(total);
179+
}
177180
pb.set_position(current);
178181
} else if bars.len() < self.max_bars {
179182
let pb = self.multi.add(ProgressBar::new(total));
@@ -207,6 +210,10 @@ async fn main() -> Result<(), Error> {
207210
}
208211

209212
async fn generate_manifest(args: GenManifestArgs) -> Result<(), Error> {
213+
println!(
214+
"Generating manifest for build at {} with asset URL {}",
215+
args.build_path, args.asset_url
216+
);
210217
let parent_uuid: Option<Uuid> = if let Some(p) = args.parent {
211218
Some(Uuid::parse_str(p.as_str())?)
212219
} else {
@@ -220,8 +227,11 @@ async fn generate_manifest(args: GenManifestArgs) -> Result<(), Error> {
220227
parent_uuid,
221228
)
222229
.await?;
230+
println!("Build UUID: {}", version.get_uuid());
223231

224-
version.export_manifest(&args.output_path)
232+
version.export_manifest(&args.output_path)?;
233+
println!("Manifest exported to {}", args.output_path);
234+
Ok(())
225235
}
226236

227237
async fn download_build(args: DownloadBuildArgs) -> Result<(), Error> {

0 commit comments

Comments
 (0)