foreach($this->portLocks as$lock){ $lock->release(); } $ws = $this->getWorkspaceDirectory(); $fs = newSymfonyFilesystem(); if($this->destroyBuild && $fs->exists($ws)){ // Filter out symlinks as chmod cannot alter them.
$finder = newFinder(); $finder->in($ws) ->directories() ->ignoreVCS(FALSE) ->ignoreDotFiles(FALSE) // composer script is a symlink and fails chmod. Ignore it.
->notPath('/^vendor\/bin\/composer$/'); $fs->chmod($finder->getIterator(), 0775, 0000); $fs->remove($ws); } }
/**
* Get the working directory within the workspace, creating if necessary.
*
* @param string $working_dir
* The path within the workspace directory.
*
* @return string
* The full path to the working directory within the workspace directory.
*/
'Directory is not empty: ' . implode(', ', $files) );