Commit 2e5fe5a1 authored by Russ Cox's avatar Russ Cox

goinstall: let git/hg/svn create the final directory element

R=r
CC=golang-dev
https://golang.org/cl/634044
parent 2243fe9f
......@@ -9,6 +9,7 @@ package main
import (
"http"
"os"
"path"
"regexp"
"strings"
)
......@@ -130,7 +131,8 @@ func vcsCheckout(vcs *vcs, dst, repo, dashpath string) os.Error {
return os.ErrorString("not a directory: " + dst)
}
if err != nil {
if err := os.MkdirAll(dst, 0777); err != nil {
parent, _ := path.Split(dst)
if err := os.MkdirAll(parent, 0777); err != nil {
return err
}
if err := run("/", nil, vcs.cmd, vcs.clone, repo, dst); err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment