Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnester committed Jul 25, 2023
1 parent b79c522 commit 61441e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bundle/artifacts/autodetect.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/databricks/cli/bundle"
"github.com/databricks/cli/bundle/artifacts/whl"
"github.com/databricks/cli/libs/log"
)

func DetectPackages() bundle.Mutator {
Expand All @@ -21,6 +22,7 @@ func (m *autodetect) Name() string {
func (m *autodetect) Apply(ctx context.Context, b *bundle.Bundle) error {
// If artifacts section explicitly defined, do not try to auto detect packages
if b.Config.Artifacts != nil {
log.Debugf(ctx, "artifacts block is defined, skipping auto-detecting")
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion bundle/artifacts/whl/autodetect.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func extractModuleName(setupPy string) string {
}

content := string(bytes)
r := regexp.MustCompile("name=['\"](.*)['\"]")
r := regexp.MustCompile(`name=['"](.*)['"]`)
matches := r.FindStringSubmatch(content)
if len(matches) == 0 {
return randomName()
Expand Down

0 comments on commit 61441e4

Please sign in to comment.