Improve some error handling

This commit is contained in:
Julian Ospald 2019-04-24 14:38:34 +08:00
parent 01f7a58565
commit 3c5e323490
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
1 changed files with 3 additions and 0 deletions

3
ghcup
View File

@ -1217,6 +1217,7 @@ known_tool_versions() {
mytool=$1
meta_file="$(get_meta_version_file)"
[ -z "${meta_file}" ] && die "failed to get meta file"
awk "
NF {
@ -1240,6 +1241,7 @@ known_tool_tags() {
mytool=$1
meta_file="$(get_meta_version_file)"
[ -z "${meta_file}" ] && die "failed to get meta file"
awk "
NF {
@ -1744,6 +1746,7 @@ list() {
criteria=$3
meta_file="$(get_meta_version_file)"
[ -z "${meta_file}" ] && die "failed to get meta file"
if ! ${raw_format} ; then
printf "\\033[1;32m%s\\033[0m\\n" "Available versions:"