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