In relation to when the error in #3 occurs, it always removed the working directory, and made it difficult to debug. Had to comment out cleanup and the reference to it in. But it seems like it was just running because of its inclusion in main.sh without checking on the cleanup function.
Propose adding the check into the cleanup function to keep cleanup from running when CLEANUP is set to false
In relation to when the error in #3 occurs, it always removed the working directory, and made it difficult to debug. Had to comment out cleanup and the reference to it in. But it seems like it was just running because of its inclusion in main.sh without checking on the cleanup function.
Propose adding the check into the cleanup function to keep cleanup from running when CLEANUP is set to false