fix: config
This commit is contained in:
parent
353367c9b5
commit
89f5cf19f7
10
main.go
10
main.go
@ -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 := ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user