Files
yt-dlp-webui/server/updater/update.go
2023-01-12 21:10:23 +01:00

19 lines
312 B
Go

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