Skip to content

Commit 226dfdd

Browse files
committed
Fix a regression in the doCheckout procedure
Pass the requested branch to the `git` or `hg` command instead of the "branch" word. Related to #127
1 parent 6dfd5b8 commit 226dfdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/nimblepkg/download.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ proc doCheckout(meth: DownloadMethod, downloadDir, branch: string) =
2121
# Force is used here because local changes may appear straight after a clone
2222
# has happened. Like in the case of git on Windows where it messes up the
2323
# damn line endings.
24-
discard tryDoCmdEx(&"git -C {downloadDir} checkout --force branch")
24+
discard tryDoCmdEx(&"git -C {downloadDir} checkout --force {branch}")
2525
discard tryDoCmdEx(
2626
&"git -C {downloadDir} submodule update --recursive --depth 1")
2727
of DownloadMethod.hg:
28-
discard tryDoCmdEx(&"hg --cwd {downloadDir} checkout branch")
28+
discard tryDoCmdEx(&"hg --cwd {downloadDir} checkout {branch}")
2929

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

0 commit comments

Comments
 (0)