You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#If we are in a build or a pester test, load assemblies from a temporary file so they don't lock the original file
9
9
#This helps to prevent cleaning problems due to a powershell session locking the file because unloading a module doesn't unload assemblies
10
-
if ($BuildTask-or$TestDrive) {
10
+
if ($BuildTask-or$TestDrive-or$env:BUILD_BUILDID) {
11
11
write-verbose"Detected Invoke-Build or Pester, loading assemblies from a temp location to avoid locking issues"
12
-
<# TODO: Redo this to test for assemblies and if they are in the same path or a temp directory, warn about it. Global vars are bad mmkay.
13
-
if ($Global:BuildAssembliesLoadedPreviously) {
14
-
write-warning "You are in a build or test environment. We detected that module assemblies were loaded in this same session on a previous build or test. Strongly recommend you kill the process and start a new session for a clean build/test!"
0 commit comments