Skip to content

Commit bb24fd0

Browse files
EchoPouetArMourMagdom96
authored
Add warning message when cloning the HEAD. (#809)
* Add warning message when cloning the HEAD. * Update src/nimblepkg/download.nim Co-authored-by: Dominik Picheta <[email protected]> * Update download.nim Co-authored-by: Arnaud MOURA <[email protected]> Co-authored-by: Dominik Picheta <[email protected]>
1 parent 752f88e commit bb24fd0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/nimblepkg/download.nim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ proc doDownload(url: string, downloadDir: string, verRange: VersionRange,
205205
onlyTip = not options.forceFullClone)
206206
else:
207207
# If no commits have been tagged on the repo we just clone HEAD.
208+
display("Warning:", "The package has no tagged releases, downloading HEAD instead.", Warning,
209+
priority = HighPriority)
208210
doClone(downMethod, url, downloadDir) # Grab HEAD.
209211
of DownloadMethod.hg:
210212
doClone(downMethod, url, downloadDir, onlyTip = not options.forceFullClone)
@@ -216,6 +218,9 @@ proc doDownload(url: string, downloadDir: string, verRange: VersionRange,
216218
display("Switching", "to latest tagged version: " & latest.tag,
217219
priority = MediumPriority)
218220
doCheckout(downMethod, downloadDir, latest.tag)
221+
else:
222+
display("Warning:", "The package has no tagged releases, downloading HEAD instead.", Warning,
223+
priority = HighPriority)
219224

220225
proc downloadPkg*(url: string, verRange: VersionRange,
221226
downMethod: DownloadMethod,

0 commit comments

Comments
 (0)