Skip to content

Commit

Permalink
refactor: rename remaining includeArchive variables
Browse files Browse the repository at this point in the history
The `includeUnsupported` variable was previously named `includeArchive`
in reference to the `unsupported.json` file previously named `archive.json`.

See: canonical/dotnet-manifest#6 (comment)
  • Loading branch information
dviererbe committed Nov 25, 2024
1 parent 0b53351 commit 54c48fd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Dotnet.Installer.Console/Commands/InstallCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private async Task Handle(string component, string version)
{
if (Directory.Exists(_manifestService.DotnetInstallLocation))
{
await _manifestService.Initialize(includeArchive: true);
await _manifestService.Initialize(includeUnsupported: true);

var requestedComponent = version switch
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public interface IManifestService
IEnumerable<Component> Remote { get; }
IEnumerable<Component> Merged { get; }

Task Initialize(bool includeArchive = false, CancellationToken cancellationToken = default);
Task Initialize(bool includeUnsupported = false, CancellationToken cancellationToken = default);
Task Add(Component component, bool isRootComponent, CancellationToken cancellationToken = default);
Task Remove(Component component, CancellationToken cancellationToken = default);
Component? MatchVersion(string component, string version);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private static async Task<List<Component>> LoadRemote(bool includeUnsupported =
private async Task Refresh(CancellationToken cancellationToken = default)
{
_local = await LoadLocal(cancellationToken);
_remote = await LoadRemote(_includeArchive, cancellationToken);
_remote = await LoadRemote(_includeUnsupported, cancellationToken);
_merged = Merge(_remote, _local);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public partial class ManifestService : IManifestService
private List<Component> _local = [];
private List<Component> _remote = [];
private List<Component> _merged = [];
private bool _includeArchive = false;
private bool _includeUnsupported = false;

public string SnapConfigurationLocation => SnapConfigPath;
public string DotnetInstallLocation =>
Expand Down Expand Up @@ -49,9 +49,9 @@ public IEnumerable<Component> Merged
private set => _merged = value.ToList();
}

public Task Initialize(bool includeArchive = false, CancellationToken cancellationToken = default)
public Task Initialize(bool includeUnsupported = false, CancellationToken cancellationToken = default)
{
_includeArchive = includeArchive;
_includeUnsupported = includeUnsupported;
return Refresh(cancellationToken);
}

Expand Down

0 comments on commit 54c48fd

Please sign in to comment.