mod: fix mod get
Signed-off-by: Sam Alba <samalba@users.noreply.github.com>
This commit is contained in:
parent
33685f9bbf
commit
285edb4cf0
@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
@ -85,6 +86,11 @@ func replace(r *Require, sourceRepoPath, destPath string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Make sure the destination exists
|
||||
if err := os.MkdirAll(filepath.Dir(destPath), 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := os.Rename(path.Join(sourceRepoPath, r.clonePath), destPath); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user