Improve error messages
This commit is contained in:
@ -41,7 +41,7 @@ while getopts "hde" opt; do
|
|||||||
useEnv=true
|
useEnv=true
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage "Error: unhandled option: $opt"
|
usage "unhandled option: $opt"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@ -49,7 +49,7 @@ shift $((OPTIND - 1))
|
|||||||
|
|
||||||
if $useEnv; then
|
if $useEnv; then
|
||||||
[[ -n $SOLANA_METRICS_CONFIG ]] ||
|
[[ -n $SOLANA_METRICS_CONFIG ]] ||
|
||||||
usage "Error: SOLANA_METRICS_CONFIG is not defined in the environment"
|
usage "SOLANA_METRICS_CONFIG is not defined in the environment"
|
||||||
else
|
else
|
||||||
username=$1
|
username=$1
|
||||||
[[ -n "$username" ]] || usage "username not specified"
|
[[ -n "$username" ]] || usage "username not specified"
|
||||||
|
Reference in New Issue
Block a user