Skip to content

Commit e671350

Browse files
authored
Revert: Go setup - Restore direct suffix (#333)
1 parent 049e011 commit e671350

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

artifactory/commands/setup/setup.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ func (sc *SetupCommand) configureYarn() (err error) {
348348
// configureGo configures Go to use the Artifactory repository for GOPROXY.
349349
// Runs the following command:
350350
//
351-
// go env -w GOPROXY=https://<user>:<token>@<your-artifactory-url>/artifactory/go/<repo-name>
351+
// go env -w GOPROXY=https://<user>:<token>@<your-artifactory-url>/artifactory/go/<repo-name>,direct
352352
func (sc *SetupCommand) configureGo() error {
353353
if goProxyVal := os.Getenv("GOPROXY"); goProxyVal != "" {
354354
// Remove the variable so it won't override the newly configured proxy (temporarily).
@@ -363,7 +363,7 @@ func (sc *SetupCommand) configureGo() error {
363363
log.Warn(fmt.Sprintf("A local GOPROXY='%s' is set and will override the global setting.\n"+
364364
"Unset it in your shell config (e.g., .zshrc, .bashrc).", goProxyVal))
365365
}
366-
repoWithCredsUrl, err := golang.GetArtifactoryRemoteRepoUrl(sc.serverDetails, sc.repoName, golang.GoProxyUrlParams{Direct: false})
366+
repoWithCredsUrl, err := golang.GetArtifactoryRemoteRepoUrl(sc.serverDetails, sc.repoName, golang.GoProxyUrlParams{Direct: true})
367367
if err != nil {
368368
return fmt.Errorf("failed to get Go repository URL: %w", err)
369369
}

0 commit comments

Comments
 (0)