Skip to content

Commit

Permalink
Add warning message when cloning the HEAD. (#809)
Browse files Browse the repository at this point in the history
* Add warning  message when cloning the HEAD.

* Update src/nimblepkg/download.nim

Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>

* Update download.nim

Co-authored-by: Arnaud MOURA <arnaud.moura@magellium.fr>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
  • Loading branch information
3 people authored Jun 27, 2021
1 parent 752f88e commit bb24fd0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/nimblepkg/download.nim
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ proc doDownload(url: string, downloadDir: string, verRange: VersionRange,
onlyTip = not options.forceFullClone)
else:
# If no commits have been tagged on the repo we just clone HEAD.
display("Warning:", "The package has no tagged releases, downloading HEAD instead.", Warning,
priority = HighPriority)
doClone(downMethod, url, downloadDir) # Grab HEAD.
of DownloadMethod.hg:
doClone(downMethod, url, downloadDir, onlyTip = not options.forceFullClone)
Expand All @@ -216,6 +218,9 @@ proc doDownload(url: string, downloadDir: string, verRange: VersionRange,
display("Switching", "to latest tagged version: " & latest.tag,
priority = MediumPriority)
doCheckout(downMethod, downloadDir, latest.tag)
else:
display("Warning:", "The package has no tagged releases, downloading HEAD instead.", Warning,
priority = HighPriority)

proc downloadPkg*(url: string, verRange: VersionRange,
downMethod: DownloadMethod,
Expand Down

0 comments on commit bb24fd0

Please sign in to comment.