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); }
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 async Task <bool> ExecuteAsync(ICakeEngine engine, CakeHostOptions options) { _executionSettings.SetTarget(options.Target); _log.Information("Performing dry run..."); _log.Information("Target is: {0}", options.Target); _log.Information(string.Empty); var strategy = new DryRunExecutionStrategy(_log); await engine.RunTargetAsync(_context, strategy, _executionSettings).ConfigureAwait(false); _log.Information(string.Empty); _log.Information("This was a dry run."); _log.Information("No tasks were actually executed."); return(true); }