tests fixes and sprints work
This commit is contained in:
@@ -45,7 +45,7 @@ public static class BundleVerifyCommand
|
||||
var bundleOption = new Option<string>("--bundle", "-b")
|
||||
{
|
||||
Description = "Path to bundle (tar.gz or directory)",
|
||||
IsRequired = true
|
||||
Required = true
|
||||
};
|
||||
|
||||
var trustRootOption = new Option<string?>("--trust-root")
|
||||
@@ -267,10 +267,9 @@ public static class BundleVerifyCommand
|
||||
using var reader = new StreamReader(gz);
|
||||
|
||||
// Simple extraction (matches our simple tar format)
|
||||
while (!reader.EndOfStream)
|
||||
string? line;
|
||||
while ((line = await reader.ReadLineAsync(ct)) != null)
|
||||
{
|
||||
var line = await reader.ReadLineAsync(ct);
|
||||
if (line == null) break;
|
||||
|
||||
if (line.StartsWith("FILE:"))
|
||||
{
|
||||
@@ -288,7 +287,7 @@ public static class BundleVerifyCommand
|
||||
}
|
||||
|
||||
var buffer = new char[size];
|
||||
await reader.ReadBlockAsync(buffer, 0, size, ct);
|
||||
await reader.ReadBlockAsync(buffer, 0, size);
|
||||
await File.WriteAllTextAsync(fullPath, new string(buffer), ct);
|
||||
}
|
||||
}
|
||||
@@ -472,9 +471,10 @@ public static class BundleVerifyCommand
|
||||
|
||||
// Check that required payload types are present
|
||||
var present = manifest?.Bundle?.Artifacts?
|
||||
.Where(a => !string.IsNullOrEmpty(a.MediaType))
|
||||
.Select(a => a.MediaType)
|
||||
.ToHashSet() ?? [];
|
||||
.Where(mediaType => !string.IsNullOrWhiteSpace(mediaType))
|
||||
.Select(mediaType => mediaType!)
|
||||
.ToHashSet(StringComparer.OrdinalIgnoreCase) ?? [];
|
||||
|
||||
var missing = expected.Where(e => !present.Any(p =>
|
||||
p.Contains(e.Split(';')[0], StringComparison.OrdinalIgnoreCase))).ToList();
|
||||
|
||||
Reference in New Issue
Block a user