removed unnecessary leading new lines
Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
parent
28cebb1bf0
commit
b5b73a3a8f
@ -391,7 +391,6 @@ func cueModInit(ctx context.Context, parentDir string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func VendorUniverse(ctx context.Context, p string) error {
|
func VendorUniverse(ctx context.Context, p string) error {
|
||||||
|
|
||||||
if p == "" {
|
if p == "" {
|
||||||
p = getCueModParent()
|
p = getCueModParent()
|
||||||
}
|
}
|
||||||
@ -421,13 +420,11 @@ func VendorUniverse(ctx context.Context, p string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getCueModParent() string {
|
func getCueModParent() string {
|
||||||
|
|
||||||
cwd, _ := os.Getwd()
|
cwd, _ := os.Getwd()
|
||||||
parentDir := cwd
|
parentDir := cwd
|
||||||
|
|
||||||
// traverse the directory tree up through ancestors looking for a cue.mod folder
|
// traverse the directory tree up through ancestors looking for a cue.mod folder
|
||||||
for {
|
for {
|
||||||
|
|
||||||
if _, err := os.Stat(path.Join(parentDir, "cue.mod")); !errors.Is(err, os.ErrNotExist) {
|
if _, err := os.Stat(path.Join(parentDir, "cue.mod")); !errors.Is(err, os.ErrNotExist) {
|
||||||
break // found it!
|
break // found it!
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user