Octopus "Work" folder -- Sub-Folders delete before the step kicks off


I’m facing an issue where I have a step that run a custom PowerShell script, but when the script is ready to kick off, the folder it’s located in (under the “C:\Octopus\Work” folder) is deleted. The error that I got was this one:

The [XYZ] package directory could not be found at the default package location.
At C:\Octopus\Work\20161103235723-217\Script.ps1:10 char:5

When I logged into the server to observe this behavior, I quickly made copies of the folders (under Work) before they were deleted, and confirmed that this folder (“20161103235723-217”) and it’s script did exist… but was deleted before the step could actually be started.

Any suggestions here on how to tackle this?


Please disregard… the error was misleading at first glance, and the underlying problem was that the package artifact folder was missing.