fix(shorebird_cli): flaky windows failure due to pkg:archive (#1906)

This commit is contained in:
Felix Angelov
2024-04-16 13:38:19 -05:00
committed by GitHub
parent 3ad8a19df1
commit 2972919a5e
4 changed files with 17 additions and 7 deletions
@@ -88,7 +88,7 @@ Failed to create diff (exit code ${result.exitCode}).
await Isolate.run(() async {
final inputStream = InputFileStream(zipFile.path);
final archive = ZipDecoder().decodeBuffer(inputStream);
extractArchiveToDisk(archive, outputDirectory.path);
await extractArchiveToDisk(archive, outputDirectory.path);
inputStream.closeSync();
});
}
@@ -511,7 +511,7 @@ class PreviewCommand extends ShorebirdCommand {
);
}
}
encoder.close();
await encoder.close();
// Replace the existing preview artifact with the updated one.
tmpAabFile.copySync(aabFile.path);
+5 -4
View File
@@ -20,10 +20,11 @@ packages:
archive:
dependency: "direct main"
description:
name: archive
sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d"
url: "https://pub.dev"
source: hosted
path: "."
ref: "6b5bf69f76164c7dad164555491e18d5be683785"
resolved-ref: "6b5bf69f76164c7dad164555491e18d5be683785"
url: "https://github.com/brendan-duncan/archive"
source: git
version: "3.4.10"
args:
dependency: "direct main"
+10 -1
View File
@@ -9,7 +9,16 @@ environment:
sdk: ">=3.0.0 <4.0.0"
dependencies:
archive: ^3.3.6
# TODO(felangel): Use a published version on pub once a new release is published (>3.4.10).
# We're using a specific commit because the latest published version (3.4.10)
# does not include a sync close API for ZipFileEncoder.
# https://github.com/brendan-duncan/archive/commit/94bf62410e9a073451bda0d851a07e8b8863bde4
# This was causing a flaky test on windows when using `shorebird preview`
# https://github.com/shorebirdtech/shorebird/issues/1902
archive:
git:
url: https://github.com/brendan-duncan/archive
ref: 6b5bf69f76164c7dad164555491e18d5be683785
args: ^2.3.1
barbecue: ^0.5.0
checked_yaml: ^2.0.2