Skip to content

Commit dff0820

Browse files
committed
use JoinPath in batch_remote
1 parent 681f498 commit dff0820

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

cmd/src/batch_remote.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"flag"
66
"fmt"
77
cliLog "log"
8-
"strings"
98
"time"
109

1110
"github.com/sourcegraph/sourcegraph/lib/errors"
@@ -155,13 +154,14 @@ Examples:
155154
}
156155
ui.ExecutingBatchSpecSuccess()
157156

158-
executionURL := fmt.Sprintf(
159-
"%s/%s/batch-changes/%s/executions/%s",
160-
cfg.endpointURL,
161-
strings.TrimPrefix(namespace.URL, "/"),
162-
batchChangeName,
163-
batchSpecID,
164-
)
157+
executionURL := cfg.endpointURL.JoinPath(
158+
fmt.Sprintf(
159+
"%s/batch-changes/%s/executions/%s",
160+
namespace.URL,
161+
batchChangeName,
162+
batchSpecID,
163+
),
164+
).String()
165165
ui.RemoteSuccess(executionURL)
166166

167167
return nil

0 commit comments

Comments
 (0)