- my $exe = catfile(catdir(SL::System::Process->exe_dir, 'scripts'), 'task_server.pl');
- $self->last_command_output(`${exe} ${command}`);
+ my ($fh, $file_name) = tempfile();
+ my $exe = catfile(catdir(SL::System::Process->exe_dir, 'scripts'), 'task_server.pl');
+
+ system "${exe} ${command} >> ${file_name} 2>&1";
+
+ $fh->close;
+
+ $self->last_command_output(read_file($file_name));