We ran into an issue where the same script used to deploy locally was giving unexpected behavior on remote server. After lot of debugging we found that this is because the download step in our Azure Pipeline:
steps:
- download: current
does not overwrite the target directory i.e., any files left behind from previous runs will remain there and can cause unintended side-effects. Is there any way to tell the Azure pipeline to clean the target directory and remove everything in it before downloading the artifact?