Avoid arbitrary format strings upon calling fail() function (#7112)
This commit is contained in:
parent
9002c5157b
commit
45f588e85d
1 changed files with 4 additions and 4 deletions
|
@ -53,7 +53,7 @@ func checkLFSVersion() {
|
||||||
//Needs at least git v2.1.2
|
//Needs at least git v2.1.2
|
||||||
binVersion, err := git.BinVersion()
|
binVersion, err := git.BinVersion()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fail(fmt.Sprintf("Error retrieving git version: %v", err), fmt.Sprintf("Error retrieving git version: %v", err))
|
fail("LFS server error", "Error retrieving git version: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !version.Compare(binVersion, "2.1.2", ">=") {
|
if !version.Compare(binVersion, "2.1.2", ">=") {
|
||||||
|
@ -199,12 +199,12 @@ func runServ(c *cli.Context) error {
|
||||||
if private.IsErrServCommand(err) {
|
if private.IsErrServCommand(err) {
|
||||||
errServCommand := err.(private.ErrServCommand)
|
errServCommand := err.(private.ErrServCommand)
|
||||||
if errServCommand.StatusCode != http.StatusInternalServerError {
|
if errServCommand.StatusCode != http.StatusInternalServerError {
|
||||||
fail("Unauthorized", errServCommand.Error())
|
fail("Unauthorized", "%s", errServCommand.Error())
|
||||||
} else {
|
} else {
|
||||||
fail("Internal Server Error", errServCommand.Error())
|
fail("Internal Server Error", "%s", errServCommand.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fail("Internal Server Error", err.Error())
|
fail("Internal Server Error", "%s", err.Error())
|
||||||
}
|
}
|
||||||
os.Setenv(models.EnvRepoIsWiki, strconv.FormatBool(results.IsWiki))
|
os.Setenv(models.EnvRepoIsWiki, strconv.FormatBool(results.IsWiki))
|
||||||
os.Setenv(models.EnvRepoName, results.RepoName)
|
os.Setenv(models.EnvRepoName, results.RepoName)
|
||||||
|
|
Loading…
Reference in a new issue