Skip to content

Commit

Permalink
Fix a regression in the doCheckout procedure
Browse files Browse the repository at this point in the history
Pass the requested branch to the `git` or `hg` command instead of the
"branch" word.

Related to nim-lang#127
  • Loading branch information
bobeff authored and CyberTailor committed Dec 12, 2021
1 parent 3c6cf9c commit a125d3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nimblepkg/download.nim
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ proc doCheckout(meth: DownloadMethod, downloadDir, branch: string) =
# Force is used here because local changes may appear straight after a clone
# has happened. Like in the case of git on Windows where it messes up the
# damn line endings.
discard tryDoCmdEx(&"git -C {downloadDir} checkout --force branch")
discard tryDoCmdEx(&"git -C {downloadDir} checkout --force {branch}")
discard tryDoCmdEx(
&"git -C {downloadDir} submodule update --recursive --depth 1")
of DownloadMethod.hg:
discard tryDoCmdEx(&"hg --cwd {downloadDir} checkout branch")
discard tryDoCmdEx(&"hg --cwd {downloadDir} checkout {branch}")

proc doClone(meth: DownloadMethod, url, downloadDir: string, branch = "",
onlyTip = true) =
Expand Down

0 comments on commit a125d3d

Please sign in to comment.