From 07d199f7b1923c355105fe8355afc3495ae10724 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 18 Jun 2014 09:28:58 -0400 Subject: [PATCH] Allow dashes in usernames for install magic --- bucardo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bucardo b/bucardo index c788c9fb5..2685f6eaf 100755 --- a/bucardo +++ b/bucardo @@ -8399,7 +8399,7 @@ sub install { ## Check for some common errors if ($res =~ /role "(.+)" does not exist/) { my $baduser = $1; - if ($baduser eq 'postgres' and exists $ENV{USER} and $ENV{USER} =~ /^\w+$/) { + if ($baduser eq 'postgres' and exists $ENV{USER} and $ENV{USER} =~ /^[\w-]+$/) { $user = $ENV{USER}; if (!$QUIET and !$bcargs->{batch}) { print "Failed to connect as user 'postgres', will try '$user'\n"; -- 2.39.5