From: Matt S Trout Date: Sun, 16 Oct 2016 16:54:38 +0000 (+0000) Subject: fix LocalSudo, broken in 2012 by mst being an idiot X-Git-Tag: v0.004001~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f425c3cb155190f7113bda4ad91d831662a2ac7a;p=scpubgit%2FObject-Remote.git fix LocalSudo, broken in 2012 by mst being an idiot --- diff --git a/Changes b/Changes index bea4ca7..2573211 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ + - Fix LocalSudo + 0.004000 - 2016-08-26 - Add INET connector - Make strictures dep explicit diff --git a/lib/Object/Remote/Connector/LocalSudo.pm b/lib/Object/Remote/Connector/LocalSudo.pm index f3db7ea..47dead4 100644 --- a/lib/Object/Remote/Connector/LocalSudo.pm +++ b/lib/Object/Remote/Connector/LocalSudo.pm @@ -25,11 +25,12 @@ has sudo_perl_command => (is => 'lazy'); sub _build_sudo_perl_command { my ($self) = @_; - return + return [ 'sudo', '-S', '-u', $self->target_user, '-p', "[sudo] password please\n", 'perl', '-MPOSIX=dup2', '-e', 'print STDERR "GO\n"; exec(@ARGV);', - $self->perl_command; + @{$self->perl_command}, + ]; } sub _start_perl {