2

Is there a hook in psake to run a clean up block after ALL talks (not just per task)?

Thanks

Jeff
  • 35,755
  • 15
  • 108
  • 220

1 Answers1

0

There is not such an option, as far as I know. There are a few related issues:

If this feature is important, you may take a look at the similar tool Invoke-Build. It supports such features as two functions defined in a build script: Enter-Build (invoked before the first task, a place for initialization) and Exit-Build (invoked when a build is finished or failed, i.e. always, a place for clean up).

Roman Kuzmin
  • 40,627
  • 11
  • 95
  • 117
  • 1
    by no means ideal, but overriding this alias works too Set-Alias CleanupEnvironment global:Invoke-CleanUpEnvironment -Scope global – Jeff Aug 11 '16 at 15:15