Files
yt-dlp-webui/server/updater/update.go
2025-01-01 09:38:59 +01:00

20 lines
318 B
Go

package updater
import (
"os/exec"
"github.com/marcopiovanello/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()
}