fix acme install issue

This commit is contained in:
Jacky 2021-05-08 18:25:06 +08:00
parent 04836ade0c
commit d60701256e
2 changed files with 15 additions and 0 deletions

View file

@ -20,6 +20,10 @@ func TestAcme(t *testing.T) {
if os.IsNotExist(err) {
log.Println("[not found] acme.sh, installing...")
if _, err := os.Stat("../tmp"); os.IsNotExist(err) {
_ = os.Mkdir("../tmp", 0644)
}
out, err := exec.Command("curl", "-o", "../tmp/acme.sh", "https://get.acme.sh").
CombinedOutput()
if err != nil {