diff --git a/tools/deps.nim b/tools/deps.nim index e43f7a2b42e93..dafe7d31401e2 100644 --- a/tools/deps.nim +++ b/tools/deps.nim @@ -30,7 +30,9 @@ proc cloneDependency*(destDirBase: string, url: string, commit = commitHead, # note: old code used `destDir / .git` but that wouldn't prevent git clone # from failing execRetry fmt"git clone -q {url} {quotedDestDir}" - if isGitRepo(destDir): + if allowBundled: + discard "this dependency was bundled with Nim, don't do anything" + elif isGitRepo(destDir): let oldDir = getCurrentDir() setCurrentDir(destDir) try: @@ -38,7 +40,5 @@ proc cloneDependency*(destDirBase: string, url: string, commit = commitHead, exec fmt"git checkout -q {commit}" finally: setCurrentDir(oldDir) - elif allowBundled: - discard "this dependency was bundled with Nim, don't do anything" else: quit "FAILURE: " & destdir & " already exists but is not a git repo"