Skip to content

Commit

Permalink
Use normal string concat to avoid "/" removal
Browse files Browse the repository at this point in the history
  • Loading branch information
letientai299 committed Jun 5, 2019
1 parent da99136 commit bdb1a7e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/issue_browse.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package cmd

import (
"log"
"path"
"strconv"

"github.com/spf13/cobra"
Expand All @@ -28,9 +27,11 @@ var issueBrowseCmd = &cobra.Command{
log.Fatal(err)
}

issueURL := path.Join(project.WebURL, "issues")
// path.Join will remove 1 "/" from "http://" as it's consider that's
// file system path. So we better use normal string concat
issueURL := project.WebURL + "/issues"
if num > 0 {
issueURL = path.Join(issueURL, strconv.FormatInt(num, 10))
issueURL = issueURL + "/" + strconv.FormatInt(num, 10)
}

err = browse(issueURL)
Expand Down

0 comments on commit bdb1a7e

Please sign in to comment.