Exemple #1
0
            public override void Execute(PipelineContext ctx, JObject obj)
            {
                String actualCmd = Invariant.Format(cmd, fillParams(ctx, obj));

                settings.Arguments  = Invariant.Format(cmd, fillParams(ctx, obj));
                settings.WorkingDir = WorkingDir;

                using (ConsoleRunner runner = new ConsoleRunner(settings, null))
                {
                    runner.Start();
                    if (!runner.WaitForExit(10000))
                    {
                        runner.Stop_CtrlC();
                    }
                    if (runner.ExitCode != 0)
                    {
                        issueError(ctx, String.Format("cmd.exe {0}\nEnded with rc={1}.", actualCmd, runner.ExitCode));
                    }
                }
            }