Skip to content

Commit

Permalink
CR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
RobiNino committed Sep 18, 2024
1 parent 8106d1f commit 0d7d41d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/pythonutils/piputils.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ func extractPackageNameFromEggBase(eggBase string) ([]byte, error) {
// If pattern of package name of version not found, return an error.
func getProjectNameAndVersionFromFileContent(content []byte) (string, string, error) {
// Create package-name regexp.
packageNameRegexp := regexp.MustCompile(`(?m)^Name:\s` + packageNameRegexp)
packageNameWithPrefixRegexp := regexp.MustCompile(`(?m)^Name:\s` + packageNameRegexp)

// Find first nameMatch of packageNameRegexp.
nameMatch := packageNameRegexp.FindStringSubmatch(string(content))
nameMatch := packageNameWithPrefixRegexp.FindStringSubmatch(string(content))
if len(nameMatch) < 2 {
return "", "", errors.New("failed extracting package name from content")
}
Expand Down

0 comments on commit 0d7d41d

Please sign in to comment.