From b988a7a3b35a733facd94b0daf09066d03575a9b Mon Sep 17 00:00:00 2001 From: dcorral Date: Thu, 6 Nov 2025 22:02:02 +0100 Subject: [PATCH] Dockerfile and main.rs changes revert --- Dockerfile | 2 +- src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 33dde49..fdcd0f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN apk add --no-cache curl && \ ENV PATH="/root/.cargo/bin:$PATH" COPY . /app -RUN cd /app && cargo build --release && cp target/release/ssh-tui /app/tui +RUN cd /app && cargo build --release && cp target/release/ssh-tui /app/tui && chmod +x /app/tui EXPOSE 22 CMD ["/usr/local/bin/sshserver"] diff --git a/src/main.rs b/src/main.rs index 1ca0234..5c4ef9e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,14 +11,14 @@ use ratatui::{backend::CrosstermBackend, Terminal}; use std::io::stdout; fn main() -> Result<(), Box> { + eprintln!("TUI started"); enable_raw_mode()?; let (width, height) = match crossterm::terminal::size() { Ok((w, h)) if w > 0 && h > 0 => (w, h), _ => (80, 24), }; println!("Width: {}, Height: {}", width, height); - let use_alternate_screen = - std::env::var("SSH_CLIENT").is_err() && std::env::var("SSH_TTY").is_err(); + let use_alternate_screen = true; let mut stdout = stdout(); if use_alternate_screen { execute!(stdout, EnterAlternateScreen)?;