Skip to content

Commit

Permalink
Merge pull request #22 from Labbs/uncomment-recording
Browse files Browse the repository at this point in the history
uncomment recording
  • Loading branch information
moutonjeremy authored Oct 31, 2023
2 parents b255531 + 029a5d9 commit 4270df7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions backend/localcommand/local_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"unsafe"

"github.com/creack/pty"
"github.com/labbs/webtty/utils"
"github.com/pkg/errors"
"github.com/urfave/cli/v2"
)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 4270df7

Please sign in to comment.