From f3b80ddf05af9103b0cc33ee7442d0fe1e31eb56 Mon Sep 17 00:00:00 2001 From: ruinivist Date: Sat, 21 Mar 2026 23:43:15 +0000 Subject: [PATCH] fix: supress within record pty exit codes --- internal/mire/record_session.go | 6 +++--- internal/mire/record_shell.sh | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/mire/record_session.go b/internal/mire/record_session.go index f829066..f652634 100644 --- a/internal/mire/record_session.go +++ b/internal/mire/record_session.go @@ -41,9 +41,9 @@ func recordScenario(target, shellPath string, rio recordIO, sandboxConfig map[st output.Fprintln(rio.err, "Run commands in the recorder shell, then type exit to finish.") - if err := runRecordSession(target, rawIn, rawOut, shellPath, sandbox, rio, sandboxConfig, setupScripts); err != nil { - return err - } + // this error is intentionally discarded to avoid non zero exit status inside record + // as an error + runRecordSession(target, rawIn, rawOut, shellPath, sandbox, rio, sandboxConfig, setupScripts) save, err := confirmRecordSave(rio) if err != nil { diff --git a/internal/mire/record_shell.sh b/internal/mire/record_shell.sh index c19e432..6651a8c 100644 --- a/internal/mire/record_shell.sh +++ b/internal/mire/record_shell.sh @@ -1,7 +1,6 @@ #!/bin/sh set -eu -# hoisted vars to fail fast if any missing host_home=${MIRE_HOST_HOME:?} host_tmp=${MIRE_HOST_TMP:?} path_env=${MIRE_PATH_ENV:?}