@@ -24,6 +24,7 @@ import (
24
24
"net"
25
25
"net/url"
26
26
"os"
27
+ "path"
27
28
"strconv"
28
29
"strings"
29
30
"sync"
@@ -1631,16 +1632,13 @@ func applySecretsToCluster(ctx context.Context, opts *RuntimeInstallOptions) err
1631
1632
}
1632
1633
1633
1634
func createEventsReporter (ctx context.Context , cloneOpts * apgit.CloneOptions , opts * RuntimeInstallOptions ) error {
1634
- resPath := cloneOpts .FS .Join (apstore .Default .AppsDir , store .Get ().EventsReporterName , opts .RuntimeName , "resources" )
1635
- u , err := url .Parse (cloneOpts .URL ())
1635
+ u , err := url .Parse (cloneOpts .Repo )
1636
1636
if err != nil {
1637
1637
return fmt .Errorf ("failed to parse url: %w" , err )
1638
1638
}
1639
- u .Path += "/" + resPath
1640
- q := u .Query ()
1641
- q .Add ("ref" , cloneOpts .Revision ())
1642
- u .RawQuery = q .Encode ()
1643
1639
1640
+ resPath := path .Join (apstore .Default .AppsDir , store .Get ().EventsReporterName , opts .RuntimeName , "resources" )
1641
+ u = u .JoinPath (resPath )
1644
1642
appDef := & runtime.AppDef {
1645
1643
Name : store .Get ().EventsReporterName ,
1646
1644
Type : application .AppTypeDirectory ,
@@ -1676,16 +1674,13 @@ func createEventsReporter(ctx context.Context, cloneOpts *apgit.CloneOptions, op
1676
1674
}
1677
1675
1678
1676
func createReporter (ctx context.Context , cloneOpts * apgit.CloneOptions , opts * RuntimeInstallOptions , reporterCreateOpts reporterCreateOptions ) error {
1679
- resPath := cloneOpts .FS .Join (apstore .Default .AppsDir , reporterCreateOpts .reporterName , opts .RuntimeName , "resources" )
1680
- u , err := url .Parse (cloneOpts .URL ())
1677
+ u , err := url .Parse (cloneOpts .Repo )
1681
1678
if err != nil {
1682
1679
return fmt .Errorf ("failed to parse url: %w" , err )
1683
1680
}
1684
- u .Path += "/" + resPath
1685
- q := u .Query ()
1686
- q .Add ("ref" , cloneOpts .Revision ())
1687
- u .RawQuery = q .Encode ()
1688
1681
1682
+ resPath := path .Join (apstore .Default .AppsDir , reporterCreateOpts .reporterName , opts .RuntimeName , "resources" )
1683
+ u = u .JoinPath (resPath )
1689
1684
appDef := & runtime.AppDef {
1690
1685
Name : reporterCreateOpts .reporterName ,
1691
1686
Type : application .AppTypeDirectory ,
0 commit comments