Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
packages
tools
goofileN
Commits
593b501b
Commit
593b501b
authored
Nov 17, 2020
by
dmknght
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add color to error
parent
ca0816bf
Pipeline
#1441
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/goofileN.nim
src/goofileN.nim
+3
-3
No files found.
src/goofileN.nim
View file @
593b501b
...
...
@@ -95,15 +95,15 @@ proc downloadFiles(folder: string, agent: string) =
finalPath = folder & fileName
try:
# TODO add color for downloading and saved at.
# Downloading -> yellow
# Saved at -> cyan
# Error: read
echo "[+] Downloading
\e
[33m" & eachResult.realURL & "
\e
[0m"
discard
client.downloadFile(eachResult.realURL, finalPath)
waitFor(
client.downloadFile(eachResult.realURL, finalPath)
)
echo "[*] Saved at
\e
[96m" & finalPath & "
\e
[0m"
downloaded += 1
except:
stderr.write("[x] Error while downloading " & eachResult.realURL & "
\n
")
stderr.write("[x] Error while downloading
\e
[31m
" & eachResult.realURL & "
\
e
[0m
\
n
")
if eachResult.cacheURL != "No web cache URL found":
echo "[-] Download from cache is not supported. Please try it manually: " & eachResult.cacheURL
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment