From 029a5d9fc780efe13f77010ab6bc65b9790a826f Mon Sep 17 00:00:00 2001 From: Jeremy Mouton Date: Tue, 31 Oct 2023 10:34:58 +0100 Subject: [PATCH] uncomment recording --- backend/localcommand/local_command.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/backend/localcommand/local_command.go b/backend/localcommand/local_command.go index 0daf55f..7e52fce 100644 --- a/backend/localcommand/local_command.go +++ b/backend/localcommand/local_command.go @@ -11,6 +11,7 @@ import ( "unsafe" "github.com/creack/pty" + "github.com/labbs/webtty/utils" "github.com/pkg/errors" "github.com/urfave/cli/v2" ) @@ -107,18 +108,18 @@ func (lcmd *LocalCommand) Write(p []byte) (n int, err error) { output := GetTerminalState() - // diff, _ := strings.CutPrefix(output, lcmd.cmdBuffer) + diff, _ := strings.CutPrefix(output, lcmd.cmdBuffer) - // truncate := CatchAndTruncate(diff) + truncate := CatchAndTruncate(diff) // _, errLog := lcmd.logFile.WriteString(truncate) // if errLog != nil { // return n, errLog // } - // if utils.RecordingEnabled { - // go utils.PushRecording(truncate) - // } + if utils.RecordingEnabled { + go utils.PushRecording(truncate) + } lcmd.cmdBuffer = output