Skip to content

Commit

Permalink
Update main.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Bentechy66 authored Sep 16, 2020
1 parent b794a7d commit 23c33fc
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions cmd/install/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,15 @@ func main() {
return
}

if installOptions.InstallComponents["Shell"] {
apiDomain, err := promptStringIfNotDefault("What's the public URL of your API? (e.g https://api.ractf.co.uk/)", stringValidator, *apiDomainFlag)
if err != nil {
fmt.Println(Red("There was an error displaying a prompt."))
return
}
apiDomain = strings.TrimPrefix(apiDomain, "https://")
apiDomain = strings.TrimPrefix(apiDomain, "http://")
apiDomain = strings.TrimRight(apiDomain, "/")
installOptions.APIDomain = apiDomain
apiDomain, err := promptStringIfNotDefault("What's the public URL of your API? (e.g https://api.ractf.co.uk/)", stringValidator, *apiDomainFlag)
if err != nil {
fmt.Println(Red("There was an error displaying a prompt."))
return
}
apiDomain = strings.TrimPrefix(apiDomain, "https://")
apiDomain = strings.TrimPrefix(apiDomain, "http://")
apiDomain = strings.TrimRight(apiDomain, "/")
installOptions.APIDomain = apiDomain

frontendURL, err := promptStringIfNotDefault("What URL will visitors access your site through? (e.g. https://2020.ractf.co.uk/)", stringValidator, *frontendURLFlag)
if err != nil {
Expand Down

0 comments on commit 23c33fc

Please sign in to comment.