Skip to content

Commit

Permalink
fix: potential storybook fix for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
cfoust committed Oct 20, 2024
1 parent c7a1692 commit 138ac29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions cmd/stories/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"fmt"
"io"
"io/ioutil"
"os"
"time"

Expand Down Expand Up @@ -173,7 +172,7 @@ func main() {

// The recorder only stores data on Read() calls, so we need to drain
// it
go func() { _, _ = io.Copy(ioutil.Discard, stream) }()
go func() { _, _ = io.Copy(io.Discard, stream) }()
stream.Resize(size)
<-screen.Ctx().Done()

Expand Down
10 changes: 5 additions & 5 deletions docs/storybook.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ def build_file(job: Tuple[str, str]):
Screenshot {filename}
"""
elif filename.endswith(".cast"):
env = os.environ.copy()
env["TERM"] = "xterm-256color"
env["EDITOR"] = "/usr/bin/vim"

subprocess.check_call(
f"./storybook --cast {filename} -s {command}",
shell=True,
stdout=subprocess.DEVNULL,
env={
"TERM": "xterm-256color",
"EDITOR": "/usr/bin/vim",
"PS1": r" \[\e[0;31m\]▸▸▹\[\e[0m\] \[\e[0;31m\]\[\e[0m\]\[\033[00m\]",
},
env=env,
timeout=60,
)
return
Expand Down

0 comments on commit 138ac29

Please sign in to comment.