From 54631376262e1abe804671ff28daaa01801b1faa Mon Sep 17 00:00:00 2001 From: Anthony Truskinger Date: Tue, 12 Mar 2019 08:15:22 +1000 Subject: [PATCH] Fully disables CLIpager I was a day away from an update that would have negated the need for 478f910f881f690233a32a01f03e1a980eed91c8 This commit should ensure the pager is not used ever. --- src/AnalysisPrograms/AnalysisPrograms.csproj | 4 ++-- src/AnalysisPrograms/Production/MainEntryUtilities.cs | 1 + src/AnalysisPrograms/packages.config | 2 +- tests/Acoustics.Test/Acoustics.Test.csproj | 4 ++-- tests/Acoustics.Test/AnalysisPrograms/MainEntryTests.cs | 8 ++++++++ tests/Acoustics.Test/packages.config | 2 +- 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/AnalysisPrograms/AnalysisPrograms.csproj b/src/AnalysisPrograms/AnalysisPrograms.csproj index 42798d911..3494bd392 100644 --- a/src/AnalysisPrograms/AnalysisPrograms.csproj +++ b/src/AnalysisPrograms/AnalysisPrograms.csproj @@ -100,8 +100,8 @@ ..\..\packages\MathNet.Numerics.3.20.2\lib\net40\MathNet.Numerics.dll - - ..\..\packages\McMaster.Extensions.CommandLineUtils.2.3.2\lib\net45\McMaster.Extensions.CommandLineUtils.dll + + ..\..\packages\McMaster.Extensions.CommandLineUtils.2.3.3\lib\net45\McMaster.Extensions.CommandLineUtils.dll diff --git a/src/AnalysisPrograms/Production/MainEntryUtilities.cs b/src/AnalysisPrograms/Production/MainEntryUtilities.cs index 368c8ce56..106178cf0 100644 --- a/src/AnalysisPrograms/Production/MainEntryUtilities.cs +++ b/src/AnalysisPrograms/Production/MainEntryUtilities.cs @@ -327,6 +327,7 @@ internal static CommandLineApplication CreateCommandLineApplication() { var console = new PhysicalConsoleLogger(); var app = CommandLineApplication = new CommandLineApplication(console); + app.UsePagerForHelpText = false; app.ClusterOptions = false; app.HelpTextGenerator = new CustomHelpTextGenerator { EnvironmentOptions = EnvironmentOptions }; app.ValueParsers.AddOrReplace(new DateTimeOffsetParser()); diff --git a/src/AnalysisPrograms/packages.config b/src/AnalysisPrograms/packages.config index 48ae21623..61caf4c4e 100644 --- a/src/AnalysisPrograms/packages.config +++ b/src/AnalysisPrograms/packages.config @@ -16,7 +16,7 @@ - + diff --git a/tests/Acoustics.Test/Acoustics.Test.csproj b/tests/Acoustics.Test/Acoustics.Test.csproj index 070e90136..a23dc7c10 100644 --- a/tests/Acoustics.Test/Acoustics.Test.csproj +++ b/tests/Acoustics.Test/Acoustics.Test.csproj @@ -71,8 +71,8 @@ ..\..\packages\log4net.2.0.8\lib\net45-full\log4net.dll - - ..\..\packages\McMaster.Extensions.CommandLineUtils.2.3.2\lib\net45\McMaster.Extensions.CommandLineUtils.dll + + ..\..\packages\McMaster.Extensions.CommandLineUtils.2.3.3\lib\net45\McMaster.Extensions.CommandLineUtils.dll diff --git a/tests/Acoustics.Test/AnalysisPrograms/MainEntryTests.cs b/tests/Acoustics.Test/AnalysisPrograms/MainEntryTests.cs index 90fa7cd5e..ac64f4ccf 100644 --- a/tests/Acoustics.Test/AnalysisPrograms/MainEntryTests.cs +++ b/tests/Acoustics.Test/AnalysisPrograms/MainEntryTests.cs @@ -110,6 +110,14 @@ public void OptionClusteringIsDisabled() Assert.IsFalse(parseResult.SelectedCommand.ClusterOptions); } + [TestMethod] + public void HelpPagingIsDisabled() + { + var app = MainEntry.CreateCommandLineApplication(); + + Assert.IsFalse(app.UsePagerForHelpText); + } + private void AssertContainsCopyright(ReadOnlyCollection lines) { // copyright always on third line diff --git a/tests/Acoustics.Test/packages.config b/tests/Acoustics.Test/packages.config index efe4e3de6..298007e8f 100644 --- a/tests/Acoustics.Test/packages.config +++ b/tests/Acoustics.Test/packages.config @@ -8,7 +8,7 @@ - +