Revert "Improve version checking to also check universe"

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-11-09 18:55:55 -08:00
parent d3ccfc31ff
commit d065a1f627
4 changed files with 23 additions and 197 deletions

View File

@@ -17,7 +17,7 @@ import (
)
const (
ModFilePath = "./cue.mod/dagger.mod"
modFilePath = "./cue.mod/dagger.mod"
sumFilePath = "./cue.mod/dagger.sum"
lockFilePath = "./cue.mod/dagger.lock"
destBasePath = "./cue.mod/pkg"
@@ -31,7 +31,7 @@ type file struct {
}
func readPath(workspacePath string) (*file, error) {
pMod := path.Join(workspacePath, ModFilePath)
pMod := path.Join(workspacePath, modFilePath)
fMod, err := os.Open(pMod)
if err != nil {
if !errors.Is(err, fs.ErrNotExist) {
@@ -276,7 +276,7 @@ func (f *file) write() error {
bMod.WriteString(fmt.Sprintf("%s %s\n", r.fullPath(), r.version))
}
err := ioutil.WriteFile(path.Join(f.workspacePath, ModFilePath), bMod.Bytes(), 0600)
err := ioutil.WriteFile(path.Join(f.workspacePath, modFilePath), bMod.Bytes(), 0600)
if err != nil {
return err
}