This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-cli.git


The following commit(s) were added to refs/heads/master by this push:
     new 23b5790  remove trailing slash on apihost #481 (#485)
23b5790 is described below

commit 23b579054221434f74db50d82304fd184e717042
Author: Pierluigi Di Lorenzo <[email protected]>
AuthorDate: Thu Jan 7 16:23:45 2021 +0100

    remove trailing slash on apihost #481 (#485)
---
 commands/property.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/commands/property.go b/commands/property.go
index b87bd46..16c22a6 100644
--- a/commands/property.go
+++ b/commands/property.go
@@ -21,6 +21,7 @@ import (
        "errors"
        "fmt"
        "os"
+       "strings"
 
        "github.com/fatih/color"
        homedir "github.com/mitchellh/go-homedir"
@@ -471,7 +472,7 @@ func loadProperties() error {
        }
 
        if apiHost, hasProp := props["APIHOST"]; hasProp {
-               Properties.APIHost = apiHost
+               Properties.APIHost = strings.TrimRight(apiHost, "/")
        }
 
        if apiHost := os.Getenv("WHISK_APIHOST"); len(apiHost) > 0 {

Reply via email to