This commit is contained in:
Andrew Nester 2023-07-04 11:24:24 +02:00
parent 6d6b689623
commit 24e857e380
No known key found for this signature in database
GPG Key ID: 12BC628A44B7DA57
1 changed files with 4 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import (
"context"
"fmt"
"path/filepath"
"strings"
"github.com/databricks/cli/bundle"
"github.com/databricks/cli/bundle/config"
@ -49,7 +50,9 @@ func (m *processRootIncludes) Apply(ctx context.Context, b *bundle.Bundle) error
return err
}
if len(matches) == 0 {
// If the entry is not a glob pattern and no matches found,
// return an error because the file defined is not found
if len(matches) == 0 && !strings.Contains(entry, "*") {
return fmt.Errorf("%s defined in 'include' section does not match any files", entry)
}