fix LocalSudo, broken in 2012 by mst being an idiot
Matt S Trout [Sun, 16 Oct 2016 16:54:38 +0000 (16:54 +0000)]
Changes
lib/Object/Remote/Connector/LocalSudo.pm

diff --git a/Changes b/Changes
index bea4ca7..2573211 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,5 @@
+  - Fix LocalSudo
+
 0.004000 - 2016-08-26
   - Add INET connector
   - Make strictures dep explicit
index f3db7ea..47dead4 100644 (file)
@@ -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 {