Skip to content

Commit ed69431

Browse files
authored
hide vhs publish info when exiting with tape errors (#466)
1 parent 8ed669c commit ed69431

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,6 @@ var (
8686
return errors.New("no input provided")
8787
}
8888

89-
publishEnv, publishEnvSet := os.LookupEnv("VHS_PUBLISH")
90-
if !publishEnvSet && !publishFlag {
91-
log.Println(FaintStyle.Render("Host your GIF on vhs.charm.sh: vhs publish <file>.gif"))
92-
}
93-
9489
var publishFile string
9590
out := cmd.OutOrStdout()
9691
if quietFlag {
@@ -116,6 +111,11 @@ var (
116111
publishFile = v.Options.Video.Output.GIF
117112
})
118113

114+
publishEnv, publishEnvSet := os.LookupEnv("VHS_PUBLISH")
115+
if !publishEnvSet && !publishFlag && len(errs) == 0 {
116+
log.Println(FaintStyle.Render("Host your GIF on vhs.charm.sh: vhs publish <file>.gif"))
117+
}
118+
119119
if len(errs) > 0 {
120120
printErrors(os.Stderr, string(input), errs)
121121
return errors.New("recording failed")

0 commit comments

Comments
 (0)