From add7700a8b7dfde3cb4983a14b2467a4a3b962bb Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Tue, 25 Jun 2019 14:22:29 +0200 Subject: [PATCH] cmd/amtool: use base path from the configured URL (#1940) Signed-off-by: Simon Pasquier --- cli/root.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/root.go b/cli/root.go index b16d21212..65b18f02c 100644 --- a/cli/root.go +++ b/cli/root.go @@ -16,6 +16,7 @@ package cli import ( "net/url" "os" + "path" "time" "github.com/go-openapi/strfmt" @@ -75,7 +76,7 @@ func NewAlertmanagerClient(amURL *url.URL) *client.Alertmanager { schemes = []string{amURL.Scheme} } - cr := clientruntime.New(address, defaultAmApiv2path, schemes) + cr := clientruntime.New(address, path.Join(amURL.Path, defaultAmApiv2path), schemes) if amURL.User != nil { password, _ := amURL.User.Password()