fix: config

This commit is contained in:
zhaoyingbo 2022-07-09 18:54:56 +08:00
parent 353367c9b5
commit 89f5cf19f7

10
main.go
View File

@ -221,16 +221,16 @@ func main() {
}
// 准备部署,生成项目地址和脚本地址
projectPath := projectPath := func() string {
hasPrefix := strings.HasPrefix(c.Path, "/")
hasSuffix := strings.HasSuffix(c.Path, "/")
projectPath := func() string {
hasPrefix := strings.HasPrefix(deployConfig.Path, "/")
hasSuffix := strings.HasSuffix(deployConfig.Path, "/")
base := ""
// 如果路径以/开头,则认为是绝对路径
if hasPrefix {
base = c.Path
base = deployConfig.Path
} else {
base = home + c.Path
base = home + deployConfig.Path
}
repoFmt := ""