public override CakeReport RunTarget(string target) { var report = Engine.RunTarget(target); if (report != null && !report.IsEmpty) { _reportPrinter.Write(report); } return(report); }
/// <summary> /// Runs the specified target. /// </summary> /// <param name="target">The target to run.</param> /// <returns>The resulting report.</returns> public override CakeReport RunTarget(string target) { var strategy = new DefaultExecutionStrategy(_log); var report = Engine.RunTarget(Context, strategy, target); if (report != null && !report.IsEmpty) { _reportPrinter.Write(report); } return(report); }
public override bool Execute(ICakeEngine engine, CakeHostOptions options) { var report = engine.RunTarget(_context, _strategy, options.Target); if (report != null && !report.IsEmpty) { _printer.Write(report); } return(true); }
/// <summary> /// Runs the specified target. /// </summary> /// <param name="target">The target to run.</param> /// <returns>The resulting report.</returns> public override async Task <CakeReport> RunTargetAsync(string target) { var strategy = new DefaultExecutionStrategy(_log); var report = await Engine.RunTargetAsync(Context, strategy, target).ConfigureAwait(false); if (report != null && !report.IsEmpty) { _reportPrinter.Write(report); } return(report); }
public override async Task <bool> ExecuteAsync(ICakeEngine engine, CakeHostOptions options) { _executionSettings.SetTarget(options.Target); var report = await engine.RunTargetAsync(_context, _strategy, _executionSettings).ConfigureAwait(false); if (report != null && !report.IsEmpty) { _printer.Write(report); } return(true); }
public override bool Execute(ICakeEngine engine, CakeHostOptions options) { _executionSettings.SetTarget(options.Target); var report = engine.RunTargetAsync(_context, _strategy, _executionSettings).GetAwaiter().GetResult(); if (report != null && !report.IsEmpty) { _printer.Write(report); } return(true); }