Skip to content

Commit

Permalink
fix (#20707)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alancere authored May 6, 2023
1 parent 27f5ee0 commit 2eec707
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eng/tools/generator/cmd/v2/common/fileProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ func ReadV2ModuleNameToGetNamespace(path string) (map[string][]PackageInfo, erro
return nil, fmt.Errorf("last `track2` section does not properly end")
}

s := strings.ReplaceAll(path, "\\", "/")
s1 := strings.Split(s, "/")
specName := s1[len(s1)-3]
_, after, _ := strings.Cut(strings.ReplaceAll(path, "\\", "/"), "specification")
before, _, _ := strings.Cut(after, "resource-manager")
specName := strings.Trim(before, "/")

for i := range start {
// get the content of the `track2` section
Expand Down

0 comments on commit 2eec707

Please sign in to comment.