in src/build/Commands/CleanCommand.cs [18:66]
public async Task RunAsync()
{
var ctx = BuildContext.Default;
var bt = new Bullseye.Targets();
if (WxsOnly)
{
bt.Add("Clean#all", () =>
{
try
{ Directory.Delete(ctx.BinDir, true); }
catch { };
});
bt.Add("Clean", Bullseye.Targets.DependsOn("Clean#all"));
}
else
{
bt.Add("Clean#CompilerDir", () =>
{
try
{ Directory.Delete(ctx.CompilerDir, true); }
catch { };
});
bt.Add("Clean#OutDir", () =>
{
try
{ Directory.Delete(ctx.OutDir, true); }
catch { };
});
bt.Add("Clean",
Bullseye.Targets.DependsOn("Clean#CompilerDir", "Clean#OutDir"));
}
try
{
await bt.RunWithoutExitingAsync("Clean".Split());
}
catch
{
// We swallow exceptions here, BullsEye prints them
// TODO: use overload "messageOnly"
}
// TODO: Add support for Targets
}