File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -205,10 +205,17 @@ proc publish*(p: PackageInfo, o: Options) =
205205 if url.endsWith (" .git" ): url.setLen (url.len - 4 )
206206 downloadMethod = " git"
207207 let parsed = parseUri (url)
208+
208209 if parsed.scheme == " " :
209210 # Assuming that we got an ssh write/read URL.
210211 let sshUrl = parseUri (" ssh://" & url)
211212 url = " https://" & sshUrl.hostname & " /" & sshUrl.port & sshUrl.path
213+ elif parsed.username != " " or parsed.password != " " :
214+ # check for any confidential information
215+ # TODO : Use raiseNimbleError(msg, hintMsg) here
216+ raise newException (NimbleError ,
217+ " Cannot publish the repository URL because it contains username and/or password. Fix the remote URL. Hint: \" git remote -v\" " )
218+
212219 elif dirExists (os.getCurrentDir () / " .hg" ):
213220 downloadMethod = " hg"
214221 # TODO : Retrieve URL from hg.
You can’t perform that action at this time.
0 commit comments