mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Remove out-date runtime cli validation
This commit is contained in:
@@ -140,12 +140,6 @@ internal static class SystemCommandLineExtensions
|
||||
return option;
|
||||
}
|
||||
|
||||
public static CliOption<string> MustBeValidFrameworkString(this CliOption<string> option)
|
||||
{
|
||||
option.Validators.Add(Validate.MustBeValidFrameworkString);
|
||||
return option;
|
||||
}
|
||||
|
||||
public static CliOption<string> MustBeValidMsiVersion(this CliOption<string> option)
|
||||
{
|
||||
option.Validators.Add(Validate.MustBeValidMsiVersion);
|
||||
@@ -318,17 +312,6 @@ internal static class SystemCommandLineExtensions
|
||||
}
|
||||
}
|
||||
|
||||
public static void MustBeValidFrameworkString(OptionResult result)
|
||||
{
|
||||
for (var i = 0; i < result.Tokens.Count; i++) {
|
||||
var framework = result.Tokens[i].Value;
|
||||
bool valid = framework.Split(",").Select(Runtimes.GetRuntimeByName).All(x => x != null);
|
||||
if (!valid) {
|
||||
result.AddError($"Invalid target dependency string: {framework}.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void MustBeValidMsiVersion(OptionResult result)
|
||||
{
|
||||
for (var i = 0; i < result.Tokens.Count; i++) {
|
||||
|
||||
@@ -39,9 +39,8 @@ public class WindowsReleasifyCommand : WindowsSigningCommand
|
||||
.SetDescription("Set the delta generation mode.");
|
||||
|
||||
AddOption<string>((v) => Runtimes = v, "-f", "--framework")
|
||||
.SetDescription("List of required runtimes to install during setup. example: 'net6,vcredist143'.")
|
||||
.SetArgumentHelpName("RUNTIMES")
|
||||
.MustBeValidFrameworkString();
|
||||
.SetDescription("List of required runtimes to install during setup. example: 'net6-x64-desktop,vcredist143'.")
|
||||
.SetArgumentHelpName("RUNTIMES");
|
||||
|
||||
AddOption<FileInfo>((v) => SplashImage = v.ToFullNameOrNull(), "-s", "--splashImage")
|
||||
.SetDescription("Path to image displayed during installation.")
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Net.Http;
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
using System.Net.Http;
|
||||
using Velopack.Windows;
|
||||
|
||||
namespace Velopack.Tests
|
||||
|
||||
Reference in New Issue
Block a user