Let fission CLI tolerate URL with/without leading http://
This commit is contained in:
@@ -19,6 +19,7 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/platform9/fission/controller/client"
|
||||
)
|
||||
@@ -34,6 +35,8 @@ func getClient(serverUrl string) *client.Client {
|
||||
fatal("Need --server or FISSION_URL set to your fission server.")
|
||||
}
|
||||
|
||||
serverUrl = "http://" + strings.TrimPrefix(serverUrl, "http://")
|
||||
|
||||
return client.MakeClient(serverUrl)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user