diff --git a/lib/cli/consolecommand.cpp b/lib/cli/consolecommand.cpp index f62430977..e8c1a50d6 100644 --- a/lib/cli/consolecommand.cpp +++ b/lib/cli/consolecommand.cpp @@ -533,9 +533,10 @@ void ConsoleCommand::ExecuteScriptCompletionHandler(boost::mutex& mutex, boost:: Log(LogCritical, "ConsoleCommand") << "HTTP query failed: " << ex.what(); +#ifdef HAVE_EDITLINE /* Ensures that the terminal state is resetted */ rl_deprep_terminal(); - +#endif /* HAVE_EDITLINE */ Application::Exit(EXIT_FAILURE); } @@ -560,8 +561,10 @@ void ConsoleCommand::AutocompleteScriptCompletionHandler(boost::mutex& mutex, bo Log(LogCritical, "ConsoleCommand") << "HTTP query failed: " << ex.what(); +#ifdef HAVE_EDITLINE /* Ensures that the terminal state is resetted */ rl_deprep_terminal(); +#endif /* HAVE_EDITLINE */ Application::Exit(EXIT_FAILURE); }