Skip to content

Commit

Permalink
fix: logged message about installing packages even though nothing was…
Browse files Browse the repository at this point in the history
… installed
  • Loading branch information
iadonkey authored Sep 17, 2024
1 parent d218b11 commit 562c9dd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions TwinpackCore/Core/TwinpackService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -482,12 +482,14 @@ public async System.Threading.Tasks.Task<List<PackageItem>> AddPackagesAsync(Lis
var downloadedPackageVersions = await downloadPackagesTask;

// install downloaded packages
foreach (var package in downloadedPackageVersions)
if(_automationInterface != null && (options?.SkipInstall == null || options?.SkipInstall == false))
{
_logger.Info($"Installing {package.PackageVersion.Name} {package.PackageVersion.Version}");
if(_automationInterface != null && (options?.SkipInstall == null || options?.SkipInstall == false))
await _automationInterface.InstallPackageAsync(package, cachePath: downloadPath);
cancellationToken.ThrowIfCancellationRequested();
foreach (var package in downloadedPackageVersions)
{
_logger.Info($"Installing {package.PackageVersion.Name} {package.PackageVersion.Version}");
await _automationInterface.InstallPackageAsync(package, cachePath: downloadPath);
cancellationToken.ThrowIfCancellationRequested();
}
}

// add affected packages as references
Expand Down

0 comments on commit 562c9dd

Please sign in to comment.