Our build and deployment system execute Bash commands remotely over SSH on the imx8plus system.
The resize command sets the terminal size for the current session, which includes the number of rows and columns that are displayed in the terminal window. The problem is that, perhaps, our commands can exceed the terminal size, so they wrap up in new line, and consequently break our pipeline / commands. In effect, some weird characters are printed out on standard output and the session breaks without further explanation. I haven't dug much deeper into it, but the problem is there, and the resize is the cause.
One solution would be to skip the resize for SSH sessions.
if [ -z "$SSH_CLIENT" ] && [ -z "$SSH_TTY" ]; then
# We're not running over SSH connection, i.e. in a local terminal, so run the resize command
shopt -s checkwinsize
command -v resize &>/dev/null && resize
fi
Our build and deployment system execute Bash commands remotely over SSH on the imx8plus system. The resize command sets the terminal size for the current session, which includes the number of rows and columns that are displayed in the terminal window. The problem is that, perhaps, our commands can exceed the terminal size, so they wrap up in new line, and consequently break our pipeline / commands. In effect, some weird characters are printed out on standard output and the session breaks without further explanation. I haven't dug much deeper into it, but the problem is there, and the resize is the cause.
One solution would be to skip the resize for SSH sessions.