Skip to content

Commit

Permalink
Fix journey-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thiel committed Jun 15, 2019
1 parent d18db06 commit 854dc46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())?
Expand Down
2 changes: 1 addition & 1 deletion tests/snapshots/failure-interactive-without-tty
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 854dc46

Please sign in to comment.