VirtualEngine / Lability

Virtual Engine test lab deployment and configuration module
MIT License
282 stars 50 forks source link

McAfee DLP prevents Lability builds #383

Closed codykonior closed 4 years ago

codykonior commented 4 years ago

McAfee DLP prevents the Lability builds by locking source/destination files a bit too long and causing an exception during file copies. It may only affect me because I run with $ErrorActionPreference = "Stop".

Thankfully it's in one particular place that can be addressed easily!!!

src\private\copy-directory.ps1 ~Line 60 replace

Copy-Item -Path $fileList[$i].FullName -Destination $targetPath -Force:$Force;

with

            while ($true) {
                try {
                    Copy-Item -Path $fileList[$i].FullName -Destination $targetPath -Force:$Force;
                    break
                } catch {
                    Write-Warning "Copy item from $($fileList[$i].FullName) to $targetPath failed, trying again"
                    Start-Sleep -Seconds 1
                }
            }

This killed my workflow for 6 months or so and today I finally had my first good build in a long time ^^ So happy. Please incorporate it.

codykonior commented 4 years ago

Thanks!