More logging and dont dupe dl
This commit is contained in:
0
youtubedl/client.go
Normal file → Executable file
0
youtubedl/client.go
Normal file → Executable file
7
youtubedl/install.go
Normal file → Executable file
7
youtubedl/install.go
Normal file → Executable file
@@ -2,6 +2,7 @@ package youtubedl
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"log"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
@@ -31,11 +32,15 @@ func installPyPip3() error {
|
||||
[]string{"apt", "install", "python3", "pip3"},
|
||||
[]string{"apk", "add", "python3", "py3-pip"},
|
||||
[]string{"sudo", "apk", "add", "python3", "py3-pip"},
|
||||
[]string{"/sbin/apk", "add", "python3", "py3-pip"},
|
||||
[]string{"sudo", "/sbin/apk", "add", "python3", "py3-pip"},
|
||||
} {
|
||||
cmd := exec.Command(combo[0], combo[1:]...)
|
||||
if err := cmd.Run(); err == nil {
|
||||
err := cmd.Run()
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
log.Println("%v: %v", err, combo)
|
||||
}
|
||||
return errors.New("cannot get python3 and pip3")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user