폴더 생성 확인
This commit is contained in:
@ -2,9 +2,7 @@ package server
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"io"
|
||||
"io/fs"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
@ -27,12 +25,6 @@ func (h *houstonHandler) GetAgents(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func (h *houstonHandler) GetDeploySources(w http.ResponseWriter, r *http.Request) {
|
||||
files, err := os.ReadDir(h.deployPath)
|
||||
if err != nil {
|
||||
if errors.Is(err, fs.ErrNotExist) {
|
||||
err = os.MkdirAll("deploys", 0775)
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
logger.Error(err)
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
|
||||
Reference in New Issue
Block a user