diff --git a/cmd/local/local.go b/cmd/local/local.go index 8c3ad7c1f..ab495b50f 100644 --- a/cmd/local/local.go +++ b/cmd/local/local.go @@ -374,19 +374,6 @@ func runLocal(cmd *cobra.Command, args []string) error { var wg sync.WaitGroup wg.Add(1) go func() { - // Atlantis port-forward - atlantisStopChannel := make(chan struct{}, 1) - defer func() { - close(atlantisStopChannel) - }() - k8s.OpenPortForwardPodWrapper( - pkg.AtlantisPodName, - pkg.AtlantisNamespace, - pkg.AtlantisPodPort, - pkg.AtlantisPodLocalPort, - atlantisStopChannel, - ) - gitHubClient := githubWrapper.New() err = gitHubClient.CreatePR(branchName) if err != nil { diff --git a/pkg/helpers.go b/pkg/helpers.go index 616bfde36..1cf294f24 100644 --- a/pkg/helpers.go +++ b/pkg/helpers.go @@ -137,7 +137,11 @@ func DetokenizeDirectory(path string, fi os.FileInfo, err error) error { githubRepoOwner := viper.GetString("github.owner") githubOrg := viper.GetString("github.owner") githubUser := viper.GetString("github.user") - ngrokUrl, _ := url.Parse(viper.GetString("ngrok.url")) + + ngrokURL, err := url.Parse(viper.GetString("ngrok.url")) + if err != nil { + log.Println(err) + } githubToken := os.Getenv("KUBEFIRST_GITHUB_AUTH_TOKEN") @@ -148,8 +152,8 @@ func DetokenizeDirectory(path string, fi os.FileInfo, err error) error { newContents = strings.Replace(newContents, "", githubUser, -1) newContents = strings.Replace(newContents, "", githubToken, -1) newContents = strings.Replace(newContents, "", configs.K1Version, -1) - newContents = strings.Replace(newContents, "", ngrokUrl.String(), -1) - newContents = strings.Replace(newContents, "", ngrokUrl.Host, -1) + newContents = strings.Replace(newContents, "", ngrokURL.String(), -1) + newContents = strings.Replace(newContents, "", ngrokURL.Host, -1) var repoPathHTTPS string var repoPathSSH string