Skip to content

Commit

Permalink
chore: msg error validadtion
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuscomh committed Dec 31, 2024
1 parent 1bd5503 commit 55ff6e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion yourl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ else
fi

# Validate read input and exit if error
[[ -z "$REPLY" || "$REPLY" = 'Error' ]] && exit 1
[[ -z "$REPLY" || "$REPLY" = 'Error' ]] && \
echo "error: $1 is a invalid argment (not a file neither a URL)" >&2 && \
exit 1

# Print url shorted on bash
echo "$logo URL created:"
Expand Down

0 comments on commit 55ff6e1

Please sign in to comment.