Skip to content

Commit

Permalink
Fully disables CLIpager
Browse files Browse the repository at this point in the history
I was a day away from an update that would have negated the need for 478f910

This commit should ensure the pager is not used ever.
  • Loading branch information
atruskie committed Mar 11, 2019
1 parent ee00f00 commit 5463137
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/AnalysisPrograms/AnalysisPrograms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@
<Reference Include="MathNet.Numerics, Version=3.20.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MathNet.Numerics.3.20.2\lib\net40\MathNet.Numerics.dll</HintPath>
</Reference>
<Reference Include="McMaster.Extensions.CommandLineUtils, Version=2.3.2.0, Culture=neutral, PublicKeyToken=6f71cb76b82f055d, processorArchitecture=MSIL">
<HintPath>..\..\packages\McMaster.Extensions.CommandLineUtils.2.3.2\lib\net45\McMaster.Extensions.CommandLineUtils.dll</HintPath>
<Reference Include="McMaster.Extensions.CommandLineUtils, Version=2.3.3.0, Culture=neutral, PublicKeyToken=6f71cb76b82f055d, processorArchitecture=MSIL">
<HintPath>..\..\packages\McMaster.Extensions.CommandLineUtils.2.3.3\lib\net45\McMaster.Extensions.CommandLineUtils.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Data.Sqlite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
Expand Down
1 change: 1 addition & 0 deletions src/AnalysisPrograms/Production/MainEntryUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ internal static CommandLineApplication CreateCommandLineApplication()
{
var console = new PhysicalConsoleLogger();
var app = CommandLineApplication = new CommandLineApplication<MainArgs>(console);
app.UsePagerForHelpText = false;
app.ClusterOptions = false;
app.HelpTextGenerator = new CustomHelpTextGenerator { EnvironmentOptions = EnvironmentOptions };
app.ValueParsers.AddOrReplace(new DateTimeOffsetParser());
Expand Down
2 changes: 1 addition & 1 deletion src/AnalysisPrograms/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<package id="FSPowerPack.Parallel.Seq.Community" version="3.0.0.0" targetFramework="net462" />
<package id="log4net" version="2.0.8" targetFramework="net462" />
<package id="MathNet.Numerics" version="3.20.2" targetFramework="net462" />
<package id="McMaster.Extensions.CommandLineUtils" version="2.3.2" targetFramework="net462" />
<package id="McMaster.Extensions.CommandLineUtils" version="2.3.3" targetFramework="net462" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net462" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net462" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net462" />
Expand Down
4 changes: 2 additions & 2 deletions tests/Acoustics.Test/Acoustics.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
</Reference>
<Reference Include="McMaster.Extensions.CommandLineUtils, Version=2.3.2.0, Culture=neutral, PublicKeyToken=6f71cb76b82f055d, processorArchitecture=MSIL">
<HintPath>..\..\packages\McMaster.Extensions.CommandLineUtils.2.3.2\lib\net45\McMaster.Extensions.CommandLineUtils.dll</HintPath>
<Reference Include="McMaster.Extensions.CommandLineUtils, Version=2.3.3.0, Culture=neutral, PublicKeyToken=6f71cb76b82f055d, processorArchitecture=MSIL">
<HintPath>..\..\packages\McMaster.Extensions.CommandLineUtils.2.3.3\lib\net45\McMaster.Extensions.CommandLineUtils.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Data.Sqlite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
Expand Down
8 changes: 8 additions & 0 deletions tests/Acoustics.Test/AnalysisPrograms/MainEntryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> lines)
{
// copyright always on third line
Expand Down
2 changes: 1 addition & 1 deletion tests/Acoustics.Test/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<package id="DeepCloner" version="0.10.2" targetFramework="net462" />
<package id="fasterflect" version="2.1.3" targetFramework="net462" />
<package id="log4net" version="2.0.8" targetFramework="net462" />
<package id="McMaster.Extensions.CommandLineUtils" version="2.3.2" targetFramework="net462" />
<package id="McMaster.Extensions.CommandLineUtils" version="2.3.3" targetFramework="net462" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net462" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net462" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net462" />
Expand Down

0 comments on commit 5463137

Please sign in to comment.