Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

Commit 744c8d4

Browse files
committed
Add 404 message to match ps1
1 parent 125ae87 commit 744c8d4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/dnvm.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,11 @@ __dnvm_download() {
162162

163163
local httpResult=$(curl -L -D - "$url" -o "$runtimeFile" -# | grep "^HTTP/1.1" | head -n 1 | sed "s/HTTP.1.1 \([0-9]*\).*/\1/")
164164

165-
[[ $httpResult == "404" ]] &&printf "%b\n" "${Red}$runtimeFullName was not found in repository $DNX_ACTIVE_FEED ${RCol}" && return 1
165+
if [[ $httpResult == "404" ]]; then
166+
printf "%b\n" "${Red}$runtimeFullName was not found in repository $DNX_ACTIVE_FEED ${RCol}"
167+
printf "%b\n" "${Cya}This is most likely caused by the feed not having the version that you typed. Check that you typed the right version and try again. Other possible causes are the feed doesn't have a $DNVM_RUNTIME_SHORT_NAME of the right name format or some other error caused a 404 on the server.${RCol}"
168+
return 1
169+
fi
166170
[[ $httpResult != "302" && $httpResult != "200" ]] && echo "${Red}HTTP Error $httpResult fetching $runtimeFullName from $DNX_ACTIVE_FEED ${RCol}" && return 1
167171

168172
__dnvm_unpack $runtimeFile $runtimeFolder

0 commit comments

Comments
 (0)