diff options
author | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-06-15 16:56:11 +0800 |
---|---|---|
committer | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-06-15 16:56:11 +0800 |
commit | 854dc46e1d99ce5c089369820351b9354707a300 (patch) | |
tree | 91d071346f37cc4c934466431be82eac13772086 | |
parent | d18db061b3da35e98eaf7d9f642a84c7df74233f (diff) |
Fix journey-tests
-rw-r--r-- | src/main.rs | 7 | ||||
-rw-r--r-- | tests/snapshots/failure-interactive-without-tty | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index cce66d9..20ce001 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,11 +34,12 @@ fn run() -> Result<(), Error> { let res = match opt.command { Some(Interactive { input }) => { let mut terminal = { - let stdout = io::stdout().into_raw_mode()?; + let stdout = io::stdout() + .into_raw_mode() + .with_context(|_| "Interactive mode requires a connected terminal")?; let stdout = AlternateScreen::from(stdout); let backend = TermionBackend::new(stdout); - Terminal::new(backend) - .with_context(|_| "Interactive mode requires a connected terminal")? + Terminal::new(backend)? }; let mut app = TerminalApp::initialize(&mut terminal, walk_options, paths_from(input)?)?; app.process_events(&mut terminal, io::stdin().keys())? diff --git a/tests/snapshots/failure-interactive-without-tty b/tests/snapshots/failure-interactive-without-tty index e0065af..9d3cd92 100644 --- a/tests/snapshots/failure-interactive-without-tty +++ b/tests/snapshots/failure-interactive-without-tty @@ -1,3 +1,3 @@ -[?1049h[?1049lerror: Interactive mode requires a connected terminal +error: Interactive mode requires a connected terminal Caused by: 1: Inappropriate ioctl for device (os error 25)
\ No newline at end of file |