Skip to content

Commit c7ed9c9

Browse files
committed
fix(cli): Do not silently fail on find/List
1 parent 1cfd6f9 commit c7ed9c9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/tanka/find.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ func FindEnvs(path string, opts FindOpts) ([]*v1alpha1.Environment, error) {
4545
func find(path string) ([]*v1alpha1.Environment, error) {
4646
// try if this has envs
4747
list, err := List(path, Opts{})
48-
if len(list) != 0 && err == nil {
48+
if err != nil {
49+
return nil, err
50+
}
51+
52+
if len(list) != 0 {
4953
// it has. don't search deeper
5054
return list, nil
5155
}

0 commit comments

Comments
 (0)