mirror of https://github.com/markbates/pkger.git
copy sum too
This commit is contained in:
parent
8f84b7462f
commit
c83687a932
|
@ -68,12 +68,13 @@ func newRef(root string) (*Ref, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
b, err = ioutil.ReadFile(filepath.Join(root, "go.mod"))
|
||||
for _, n := range []string{"go.mod", "go.sum"} {
|
||||
b, err = ioutil.ReadFile(filepath.Join(root, n))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
f, err := os.Create(filepath.Join(dir, "go.mod"))
|
||||
f, err := os.Create(filepath.Join(dir, n))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -85,15 +86,7 @@ func newRef(root string) (*Ref, error) {
|
|||
if err := f.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// c := exec.Command("cp", "-rv", root, dir)
|
||||
// fmt.Println(strings.Join(c.Args, " "))
|
||||
// c.Stdout = os.Stdout
|
||||
// c.Stderr = os.Stderr
|
||||
// c.Stdin = os.Stdin
|
||||
// if err := c.Run(); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
}
|
||||
|
||||
return ref, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue