20 lines
315 B
Go
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()
|
|
}
|