Revert "Enable pager in cton-util."

This reverts commit 0538615ccc0b600d4f534dae2ee966d5ed0df9b7.

Fixes #196. The pager functionality wasn't working as intended since
long error messages appear on stdout which isn't captured by the pager.
This commit is contained in:
Jakob Stoklund Olesen
2017-11-22 11:35:03 -08:00
parent 92f378de76
commit 8e2ce6ded2
2 changed files with 0 additions and 21 deletions

View File

@@ -26,9 +26,6 @@ num_cpus = "1.5.1"
tempdir="0.3.5" tempdir="0.3.5"
term = "0.4.6" term = "0.4.6"
[target.'cfg(unix)'.dependencies]
pager = "0.13.0"
[workspace] [workspace]
# Enable debug assertions and parallel compilation when building cretonne-tools # Enable debug assertions and parallel compilation when building cretonne-tools

View File

@@ -10,17 +10,11 @@ extern crate num_cpus;
extern crate tempdir; extern crate tempdir;
extern crate term; extern crate term;
#[cfg(unix)]
extern crate pager;
use cretonne::VERSION; use cretonne::VERSION;
use docopt::Docopt; use docopt::Docopt;
use std::io::{self, Write}; use std::io::{self, Write};
use std::process; use std::process;
#[cfg(unix)]
use pager::Pager;
mod utils; mod utils;
mod filetest; mod filetest;
mod cat; mod cat;
@@ -113,19 +107,7 @@ fn cton_util() -> CommandResult {
} }
} }
#[cfg(unix)]
fn enable_pager() {
Pager::new().skip_on_notty().setup();
}
#[cfg(not(unix))]
fn enable_pager() {
// For now, pager only supports unix-type platforms.
}
fn main() { fn main() {
enable_pager();
if let Err(mut msg) = cton_util() { if let Err(mut msg) = cton_util() {
if !msg.ends_with('\n') { if !msg.ends_with('\n') {
msg.push('\n'); msg.push('\n');