cmd/cue/cmd: don't bail for non-matching files

Fixes #347

Change-Id: I8eb253ae735e4178fda5776554b270d09b8fb7cd
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7724
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/cmd/cue/cmd/orphans.go b/cmd/cue/cmd/orphans.go
index eb55a69..284e829 100644
--- a/cmd/cue/cmd/orphans.go
+++ b/cmd/cue/cmd/orphans.go
@@ -73,7 +73,7 @@
 
 	for _, f := range i.OrphanedFiles {
 		if !i.User && !re.MatchString(filepath.Base(f.Filename)) {
-			return false, nil
+			continue
 		}
 
 		// We add the module root to the path if there is a module defined.
diff --git a/cmd/cue/cmd/testdata/script/import_match.txt b/cmd/cue/cmd/testdata/script/import_match.txt
new file mode 100644
index 0000000..8339204
--- /dev/null
+++ b/cmd/cue/cmd/testdata/script/import_match.txt
@@ -0,0 +1,10 @@
+cue import -p uni --with-context -l 'path.Ext(filename)' -n '.*uni.yml' ./...
+cmp uni.cue out/expect-uni.cue
+-- uni.yml --
+hello: world
+-- service.yaml --
+x: foobie
+-- out/expect-uni.cue --
+package uni
+
+".yml": hello: "world"