Skip to content

Commit

Permalink
Displays errors and warnings on the standard error output (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliendufresne committed Jul 10, 2016
1 parent e7a4163 commit 27495fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 0 additions & 7 deletions src/_option_resolver.sh
Expand Up @@ -24,13 +24,6 @@ resolve_config_file() {
current_option_value="${current_option_value}.md"
fi

if [ ! -f "${current_option_value}" ] && [ "/" == "${current_option_value:0:1}" ]
then
error "Unable to find configuration file ${current_option_value}"
usage
exit 1
fi

if [ -f "${current_option_value}" ]
then
current_option_value=$(readlink -m ${current_option_value})
Expand Down
4 changes: 2 additions & 2 deletions src/_print.sh
Expand Up @@ -3,11 +3,11 @@
error() {
local message="$1"

printf "\e[1;91m%s\e[0m\n\n" "${message}"
>&2 printf "\e[1;91m%s\e[0m\n\n" "${message}"
}

warning() {
local message="$1"

printf "\e[1;93m%s\e[0m\n\n" "${message}"
>&2 printf "\e[1;93m%s\e[0m\n\n" "${message}"
}

0 comments on commit 27495fd

Please sign in to comment.