Files
yt-dlp-webui/server/updater/update.go
2024-11-10 13:59:40 +01:00

20 lines
315 B
Go

package updater
import (
"os/exec"
"github.com/marcopeocchi/yt-dlp-web-ui/v3/server/config"
)
// Update using the builtin function of yt-dlp
func UpdateExecutable() error {
cmd := exec.Command(config.Instance().DownloaderPath, "-U")
err := cmd.Start()
if err != nil {
return err
}
return cmd.Wait()
}