diff --git a/CHANGELOG.md b/CHANGELOG.md index 8677a27b1..fff7464bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - SharePoint backup would fail if any site had an empty display name +- Fix a bug with exports hanging post completion ## [v0.14.2] (beta) - 2023-10-17 diff --git a/src/cli/export/export.go b/src/cli/export/export.go index aeaf8f3e7..774d27904 100644 --- a/src/cli/export/export.go +++ b/src/cli/export/export.go @@ -104,9 +104,15 @@ func runExport( // It would be better to give a progressbar than a spinner, but we // have any way of knowing how many files are available as of now. diskWriteComplete := observe.MessageWithCompletion(ctx, "Writing data to disk") - defer close(diskWriteComplete) err = export.ConsumeExportCollections(ctx, exportLocation, expColl, eo.Errors) + + // The progressbar has to be closed before we move on as the Infof + // below flushes progressbar to prevent clobbering the output and + // that causes the entire export operation to stall indefinitely. + // https://github.com/alcionai/corso/blob/8102523dc62c001b301cd2ab4e799f86146ab1a0/src/cli/print/print.go#L151 + close(diskWriteComplete) + if err != nil { return Only(ctx, err) }