Skip to content

Commit

Permalink
fix: Add scope a second time to getdeploypath
Browse files Browse the repository at this point in the history
  • Loading branch information
connyay committed Sep 5, 2024
1 parent f73d4b7 commit 93b57f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/utils/npm.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ func (pi *PackageInfo) GetDeployPath() string {
if pi.Scope == "" {
return fmt.Sprintf("%s/-/%s", pi.Name, fileName)
}
return fmt.Sprintf("%s/%s/-/%s", pi.Scope, pi.Name, fileName)
return fmt.Sprintf("%s/%s/-/%s/%s", pi.Scope, pi.Name, pi.Scope, fileName)
}

func (pi *PackageInfo) FullName() string {
Expand Down
2 changes: 1 addition & 1 deletion build/utils/npm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func TestGetDeployPath(t *testing.T) {
pi *PackageInfo
}{
{`build-info-go-tests/-/build-info-go-tests-1.0.0.tgz`, &PackageInfo{Name: "build-info-go-tests", Version: "1.0.0", Scope: ""}},
{`@jfrog/build-info-go-tests/-/build-info-go-tests-1.0.0.tgz`, &PackageInfo{Name: "build-info-go-tests", Version: "1.0.0", Scope: "@jfrog"}},
{`@jfrog/build-info-go-tests/-/@jfrog/build-info-go-tests-1.0.0.tgz`, &PackageInfo{Name: "build-info-go-tests", Version: "1.0.0", Scope: "@jfrog"}},
}
for _, test := range testcases {
t.Run(test.expectedPath, func(t *testing.T) {
Expand Down

0 comments on commit 93b57f7

Please sign in to comment.