Permalink
Browse files

Update Utils::shortcode_available collision error to cite --force opt…

…ion.
  • Loading branch information...
1 parent 4ec905a commit 11e0792bbd3841b176dfde954ce7421034a09a5f @gavincarr committed Oct 12, 2014
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/Shrtn/Utils.pm
View
@@ -32,10 +32,11 @@ sub shortcode_available
my $db_url = $db->{$code};
my $display = $base_url ? "$base_url/$code" : $code;
if ($url and $db_url eq $url) {
- die "URL is already in db with that code: $display => $url\n";
+ die "Code '$code' already exists in db pointing to that URL => $url\n";
}
else {
- die "Code $code is already used in db: $display => $db_url\n";
+ warn "Code '$code' already exists in db => $db_url\n";
+ die "(use --force option to force the '$code' URL to be updated)\n";
}
}

0 comments on commit 11e0792

Please sign in to comment.