Commit 593b501b authored by dmknght's avatar dmknght

Add color to error

parent ca0816bf
Pipeline #1441 canceled with stages
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment