@@ -24,6 +24,7 @@ import (
2424 "net"
2525 "net/url"
2626 "os"
27+ "path"
2728 "strconv"
2829 "strings"
2930 "sync"
@@ -1631,16 +1632,13 @@ func applySecretsToCluster(ctx context.Context, opts *RuntimeInstallOptions) err
16311632}
16321633
16331634func 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 )
16361636 if err != nil {
16371637 return fmt .Errorf ("failed to parse url: %w" , err )
16381638 }
1639- u .Path += "/" + resPath
1640- q := u .Query ()
1641- q .Add ("ref" , cloneOpts .Revision ())
1642- u .RawQuery = q .Encode ()
16431639
1640+ resPath := path .Join (apstore .Default .AppsDir , store .Get ().EventsReporterName , opts .RuntimeName , "resources" )
1641+ u = u .JoinPath (resPath )
16441642 appDef := & runtime.AppDef {
16451643 Name : store .Get ().EventsReporterName ,
16461644 Type : application .AppTypeDirectory ,
@@ -1676,16 +1674,13 @@ func createEventsReporter(ctx context.Context, cloneOpts *apgit.CloneOptions, op
16761674}
16771675
16781676func 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 )
16811678 if err != nil {
16821679 return fmt .Errorf ("failed to parse url: %w" , err )
16831680 }
1684- u .Path += "/" + resPath
1685- q := u .Query ()
1686- q .Add ("ref" , cloneOpts .Revision ())
1687- u .RawQuery = q .Encode ()
16881681
1682+ resPath := path .Join (apstore .Default .AppsDir , reporterCreateOpts .reporterName , opts .RuntimeName , "resources" )
1683+ u = u .JoinPath (resPath )
16891684 appDef := & runtime.AppDef {
16901685 Name : reporterCreateOpts .reporterName ,
16911686 Type : application .AppTypeDirectory ,
0 commit comments