Skip to content

Commit

Permalink
Fix #203 - fix InvalidOperationException thrown from Pager on Mono
Browse files Browse the repository at this point in the history
  • Loading branch information
natemcmaster committed Jan 5, 2019
1 parent 2a376df commit 2c1b7b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
5 changes: 4 additions & 1 deletion src/CommandLineUtils/IO/Pager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ private Process CreateWriter()
FileName = "less",
Arguments = ArgumentEscaper.EscapeAndConcatenate(args),
RedirectStandardInput = true,
#if NET45
UseShellExecute = false,
#endif
}
};

Expand All @@ -139,7 +142,7 @@ private Process CreateWriter()
process.Start();
return process;
}
catch (Win32Exception ex)
catch (Exception ex)
{
if (DotNetCliContext.IsGlobalVerbose())
{
Expand Down
13 changes: 4 additions & 9 deletions version.props
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
<Project>
<PropertyGroup>
<VersionPrefix>2.3.0</VersionPrefix>
<VersionSuffix>rtm</VersionSuffix>
<VersionPrefix>2.3.1</VersionPrefix>
<VersionSuffix>build</VersionSuffix>
<PackageVersion Condition="'$(APPVEYOR_REPO_TAG)' == 'true' AND '$(VersionSuffix)' != ''">$(VersionPrefix)-$(VersionSuffix)</PackageVersion>
<PackageVersion Condition="'$(APPVEYOR_REPO_TAG)' == 'true' AND '$(VersionSuffix)' == 'rtm'">$(VersionPrefix)</PackageVersion>

<BuildNumber Condition=" '$(BuildNumber)' == '' ">$(APPVEYOR_BUILD_NUMBER)</BuildNumber>
<BuildNumber Condition=" '$(BuildNumber)' == '' ">0</BuildNumber>
<FileVersion>$(VersionPrefix).$(BuildNumber)</FileVersion>
<VersionSuffix Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix).$(BuildNumber)</VersionSuffix>
<RepositoryCommit>$(APPVEYOR_REPO_COMMIT)</RepositoryCommit>
<InformationalVersion Condition="'$(RepositoryCommit)' != ''">$(PackageVersion)+$(RepositoryCommit)</InformationalVersion>
</PropertyGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
<_Parameter1>BuildNumber</_Parameter1>
<_Parameter2>$(BuildNumber)</_Parameter2>
</AssemblyAttribute>
</ItemGroup>
</Project>

0 comments on commit 2c1b7b8

Please sign in to comment.