Skip to content

Commit

Permalink
fix: #439 (#448)
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Chabaud <[email protected]>
  • Loading branch information
t-chab and c82hcha authored Feb 29, 2024
1 parent a1b9280 commit 9c7172e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,21 @@ var serveCmd = &cobra.Command{
tempFile := filepath.Join(os.TempDir(), fmt.Sprintf("vhs-%d", rand))
defer func() { _ = os.Remove(tempFile) }()
errs := Evaluate(s.Context(), b.String(), s.Stderr(), func(v *VHS) {
var gif, mp4, webm string
var gifOutput, mp4Output, webmOutput string
switch {
case v.Options.Video.Output.MP4 != "":
tempFile += mp4
mp4 = tempFile
mp4Output = tempFile
case v.Options.Video.Output.WebM != "":
tempFile += webm
webm = tempFile
webmOutput = tempFile
default:
tempFile += gif
gif = tempFile
gifOutput = tempFile
}
v.Options.Video.Output.GIF = gif
v.Options.Video.Output.MP4 = mp4
v.Options.Video.Output.WebM = webm
v.Options.Video.Output.GIF = gifOutput
v.Options.Video.Output.MP4 = mp4Output
v.Options.Video.Output.WebM = webmOutput
})

if len(errs) > 0 {
Expand Down

0 comments on commit 9c7172e

Please sign in to comment.