Skip to content

Commit

Permalink
fix(worker): do not concat absolute path that starts
Browse files Browse the repository at this point in the history
  • Loading branch information
richardlt committed Jan 17, 2020
1 parent b6df4fd commit 40b5a94
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sdk/vcs/git/git_clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ func prepareGitCloneCommands(repo, workdirPath, path string, opts *CloneOpts) (s
if path == "" {
t := strings.Split(repo, "/")
fetchCmd.workdir = filepath.Join(workdirPath, strings.TrimSuffix(t[len(t)-1], ".git"))
} else if strings.HasPrefix(path, "/") {
fetchCmd.workdir = path
} else {
fetchCmd.workdir = filepath.Join(workdirPath, path)
}
Expand Down

0 comments on commit 40b5a94

Please sign in to comment.