mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
ExternalCommandDestination.cs edited online, hope this compiles...
This commit is contained in:
parent
f2da7e23df
commit
631ed3b36c
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue