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"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
@ -85,6 +86,11 @@ func replace(r *Require, sourceRepoPath, destPath string) error {
|
|||||||
return err
|
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 {
|
if err := os.Rename(path.Join(sourceRepoPath, r.clonePath), destPath); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user