diff --git a/src/Elskom.Check.csproj b/src/Elskom.Check.csproj
index 5fa0a78..1d1e4af 100644
--- a/src/Elskom.Check.csproj
+++ b/src/Elskom.Check.csproj
@@ -12,7 +12,7 @@
latest
Elskom.Net.Check
.NET Elskom Workload Check Tool
- 1.0.11
+ 1.0.12
Els_kom org.
Els_kom org.
A dotnet tool for installing/uninstalling and updating the Elskom workload.
@@ -20,7 +20,7 @@
A dotnet tool for installing/uninstalling and updating the Elskom workload.
- Fixed issue installing / updating the workload does not factor in manually installed runtime and reference pack updates.
+ Skip installing templates and manifest when SDK, Ref, and Runtime pack versions cannot be obtained.
Copyright © 2021
https://github.com/Elskom/installer
diff --git a/src/InstallCommand.cs b/src/InstallCommand.cs
index 0a53f3f..0e4c412 100644
--- a/src/InstallCommand.cs
+++ b/src/InstallCommand.cs
@@ -69,20 +69,27 @@ public override async Task ExecuteAsync([NotNull] CommandContext context, [
Console.WriteLine($"Successfully installed workload package '{Constants.RuntimePackName}'.");
}
- var templatePackVersion = await DownloadPackageAsync(
- Constants.TemplatePackName).ConfigureAwait(false);
- if (!templatePackVersion.Equals("already installed"))
+ // avoid installing the templates and the workload manifest if sdkPackVersion, refPackVersion,
+ // and runtimePackVersion is null or empty.
+ if (!string.IsNullOrEmpty(sdkPackVersion)
+ && !string.IsNullOrEmpty(refPackVersion)
+ && !string.IsNullOrEmpty(runtimePackVersion))
{
- Console.WriteLine($"Successfully installed workload package '{Constants.TemplatePackName}'.");
- }
+ var templatePackVersion = await DownloadPackageAsync(
+ Constants.TemplatePackName).ConfigureAwait(false);
+ if (!templatePackVersion.Equals("already installed"))
+ {
+ Console.WriteLine($"Successfully installed workload package '{Constants.TemplatePackName}'.");
+ }
- InstallManifest(settings.SdkVersion!, new Dictionary
- {
- { Constants.SdkPackName, sdkPackVersion },
- { Constants.RefPackName, refPackVersion },
- { Constants.RuntimePackName, runtimePackVersion },
- { Constants.TemplatePackName, templatePackVersion },
- });
+ InstallManifest(settings.SdkVersion!, new Dictionary
+ {
+ { Constants.SdkPackName, sdkPackVersion },
+ { Constants.RefPackName, refPackVersion },
+ { Constants.RuntimePackName, runtimePackVersion },
+ { Constants.TemplatePackName, templatePackVersion },
+ });
+ }
return 0;
}