Skip to content

Commit

Permalink
Merge pull request #2927 from ActiveState/mitchell/dx-2349
Browse files Browse the repository at this point in the history
Replace instances of `constants.PlatformURL` with host-agnostic call.
  • Loading branch information
mitchell-as authored Dec 6, 2023
2 parents 6bf014c + bc66d1f commit 12c54ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/runners/tutorial/tutorial.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (t *Tutorial) RunNewProject(params NewProjectParams) error {
t.outputer.Print(locale.Tt(
"tutorial_newproject_outro", map[string]interface{}{
"Dir": dir,
"URL": fmt.Sprintf("https://%s/%s/%s", constants.PlatformURL, t.auth.WhoAmI(), name),
"URL": api.GetPlatformURL(fmt.Sprintf("%s/%s", t.auth.WhoAmI(), name)),
"Docs": constants.DocumentationURL,
}))

Expand Down
3 changes: 1 addition & 2 deletions pkg/platform/model/vcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"regexp"
"strings"

"github.com/ActiveState/cli/internal/constants"
"github.com/ActiveState/cli/internal/errs"
"github.com/ActiveState/cli/internal/locale"
"github.com/ActiveState/cli/internal/logging"
Expand Down Expand Up @@ -241,7 +240,7 @@ func BranchCommitID(ownerName, projectName, branchName string) (*strfmt.UUID, er
if branch.CommitID == nil {
return nil, locale.NewInputError(
"err_project_no_commit",
"Your project does not have any commits yet, head over to https://{{.V0}}/{{.V1}}/{{.V2}} to set up your project.", constants.PlatformURL, ownerName, projectName)
"Your project does not have any commits yet, head over to {{.V0}} to set up your project.", api.GetPlatformURL(fmt.Sprintf("%s/%s", ownerName, projectName)).String())
}

return branch.CommitID, nil
Expand Down

0 comments on commit 12c54ae

Please sign in to comment.