Tidy gallery installer review follow-ups

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b34be394-240f-4bdd-878f-41460bc09c36
This commit is contained in:
Michael Jolley
2026-08-28 11:22:44 -05:00
parent 022aa43b37
commit 970a5aec1a
2 changed files with 10 additions and 6 deletions

View File

@@ -327,10 +327,9 @@ public sealed partial class JsonRpcExtensionService : IExtensionService, IJsExte
return [];
}
// Start the watcher before scanning so a package installed while the scan runs
// is still observed (the per-directory gate and the already-loaded check make a
// watcher-driven load and a scan-driven load for the same directory idempotent).
RecoverStaleGalleryInstallMarkersOnce();
// Start the watcher before scanning so installs during the scan are still observed.
StartDirectoryWatcher();
var accepted = DiscoverAcceptedManifests(ExtensionsPath);

View File

@@ -549,9 +549,14 @@ public sealed class NpmCommandRunner : INpmCommandRunner
return true;
}
return exception is AggregateException aggregateException
&& aggregateException.Flatten().InnerExceptions.Count > 0
&& aggregateException.Flatten().InnerExceptions.All(IsExpectedTerminationException);
if (exception is not AggregateException aggregateException)
{
return false;
}
var flattenedException = aggregateException.Flatten();
return flattenedException.InnerExceptions.Count > 0
&& flattenedException.InnerExceptions.All(IsExpectedTerminationException);
}
private static bool IsReparsePoint(string path)