File tree 1 file changed +7
-5
lines changed 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -216,16 +216,18 @@ func runServ(c *cli.Context) error {
216
216
}
217
217
}
218
218
219
- // LowerCase and trim the repoPath as that's how they are stored.
220
- repoPath = strings .ToLower (strings .TrimSpace (repoPath ))
221
-
222
219
rr := strings .SplitN (repoPath , "/" , 2 )
223
220
if len (rr ) != 2 {
224
221
return fail (ctx , "Invalid repository path" , "Invalid repository path: %v" , repoPath )
225
222
}
226
223
227
- username := strings .ToLower (rr [0 ])
228
- reponame := strings .ToLower (strings .TrimSuffix (rr [1 ], ".git" ))
224
+ username := rr [0 ]
225
+ reponame := strings .TrimSuffix (rr [1 ], ".git" )
226
+
227
+ // LowerCase and trim the repoPath as that's how they are stored.
228
+ // This should be done after splitting the repoPath into username and reponame
229
+ // so that username and reponame are not affected.
230
+ repoPath = strings .ToLower (strings .TrimSpace (repoPath ))
229
231
230
232
if alphaDashDotPattern .MatchString (reponame ) {
231
233
return fail (ctx , "Invalid repo name" , "Invalid repo name: %s" , reponame )
You can’t perform that action at this time.
0 commit comments