Reputation: 9678
Is there a way to implement a conceptual finally
clause in a FAKE script, or to formulate it differently is there an alternative to RunTargetOrDefault
that allows one to specify a Target
that should be run when a build fails.
Upvotes: 0
Views: 67
Reputation: 80744
FAKE provides a way to register a target that will run on failed build, via the BuildFailureTarget
constructor.
BuildFailureTarget "ShootMyself" <| fun _ -> ShotgunHelper.Shoot (left foot)
See documentation for more info.
Upvotes: 2