diff --git a/GreenshotExternalCommandPlugin/ExternalCommandDestination.cs b/GreenshotExternalCommandPlugin/ExternalCommandDestination.cs index 773fbee38..94f272cec 100644 --- a/GreenshotExternalCommandPlugin/ExternalCommandDestination.cs +++ b/GreenshotExternalCommandPlugin/ExternalCommandDestination.cs @@ -132,17 +132,21 @@ namespace ExternalCommand { p.StartInfo.FileName = commandline; p.StartInfo.Arguments = String.Format(arguments, fullPath); p.StartInfo.UseShellExecute = false; + if (!config.DoNotRedirect) { p.StartInfo.RedirectStandardOutput = true; + } if (verb != null) { p.StartInfo.Verb = verb; } LOG.Info("Starting : " + p.StartInfo.FileName + " " + p.StartInfo.Arguments); p.Start(); p.WaitForExit(); + if (!config.DoNotRedirect) { output = p.StandardOutput.ReadToEnd(); if (output != null && output.Trim().Length > 0) { LOG.Info("Output:\n" + output); } + } LOG.Info("Finished : " + p.StartInfo.FileName + " " + p.StartInfo.Arguments); return p.ExitCode; }