Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning message when cloning the HEAD. #809

Merged
merged 3 commits into from
Jun 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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