aboutsummaryrefslogtreecommitdiff
path: root/pastebin
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-01-05 10:38:38 -0200
committerEuAndreh <eu@euandre.org>2019-01-05 10:39:06 -0200
commit55e947d7901c17dbb1365a5cfb9f40acd50e903b (patch)
tree4e2a7db1001ccf64073824d907afaabf2e69ae91 /pastebin
parentAdd BATS tests to CLI usage and basic interactions. (diff)
downloadeuandre.org-55e947d7901c17dbb1365a5cfb9f40acd50e903b.tar.gz
euandre.org-55e947d7901c17dbb1365a5cfb9f40acd50e903b.tar.xz
Print CLI errors using Term::ANSIColor.
Diffstat (limited to '')
-rwxr-xr-xpastebin/website-pastebin3
1 files changed, 2 insertions, 1 deletions
diff --git a/pastebin/website-pastebin b/pastebin/website-pastebin
index b9f7841..6061c74 100755
--- a/pastebin/website-pastebin
+++ b/pastebin/website-pastebin
@@ -38,6 +38,7 @@ use Getopt::Long qw(:config no_ignore_case bundling);
use Pod::Usage qw(pod2usage);
use Unicode::Normalize qw(NFKD);
use File::Basename qw(dirname);
+use Term::ANSIColor;
my $help = 0;
my $title = '';
@@ -52,7 +53,7 @@ pod2usage(
pod2usage(
-verbose => 1,
-exitval => 2,
- -message => "Missing required --title argument."
+ -message => colored("Missing required --title argument.", "red")
) if !$title;
# Taken from: