Files
yt-dlp-webui/server/updater/update.go
2023-10-24 16:07:38 +02:00

20 lines
312 B
Go

package updater
import (
"os/exec"
"github.com/marcopeocchi/yt-dlp-web-ui/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()
}