mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-15 19:28:00 +01:00
Removing final "exit" from recorded stdout (resolves #138)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
* Playing asciicast from IPFS: `asciinema play ipfs://ipfs/QmcdXYJp6e4zNuimuGeWPwNMHQdxuqWmKx7NhZofQ1nw2V`
|
||||
* `-q/--quiet` option added to `rec` command
|
||||
* Fixed handling of partial UTF-8 sequences in recorded stdout
|
||||
* Final "exit" is now removed from recorded stdout
|
||||
|
||||
## 1.1.1 (2015-06-21)
|
||||
|
||||
|
||||
@@ -28,6 +28,10 @@ func (s *Stream) Write(p []byte) (int, error) {
|
||||
|
||||
func (s *Stream) Close() {
|
||||
s.incrementElapsedTime()
|
||||
|
||||
if string(s.Frames[len(s.Frames)-1].Data) == "exit\r\n" {
|
||||
s.Frames = s.Frames[:len(s.Frames)-1]
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Stream) Duration() time.Duration {
|
||||
|
||||
Reference in New Issue
Block a user