Skip to content

Commit 34ade65

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
Removed the cached file part
1 parent fb31425 commit 34ade65

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

tools/GenerateServiceModule.ps1

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -69,26 +69,6 @@ $ApiVersion | ForEach-Object {
6969
else {
7070
$FullModuleVersion = $ModuleMetadata.versions[$CurrentApiVersion].version
7171
}
72-
#Reset the autorest temp folder
73-
$TempPath = [System.IO.Path]::GetTempPath()
74-
# Check if there is any folder with autorest in the name
75-
$AutoRestTempFolder = Get-ChildItem -Path $TempPath -Recurse -Directory | Where-Object { $_.Name -match "autorest" }
76-
# Go through each folder and forcefully delete autorest related files
77-
$AutoRestTempFolder | ForEach-Object {
78-
$AutoRestTempFolder = $_
79-
#Delete files and folders if they exist
80-
if (Test-Path $AutoRestTempFolder.FullName) {
81-
#Check if each file in the folder exists
82-
Get-ChildItem -Path $AutoRestTempFolder.FullName -Recurse | ForEach-Object {
83-
$File = $_
84-
Write-Debug "Removing cached file $File"
85-
if (Test-Path $File.FullName) {
86-
#Remove the file
87-
Remove-Item -Path $File.FullName -Force -confirm:$false
88-
}
89-
}
90-
}
91-
}
9272
npx autorest --max-memory-size=$MaxMemorySize --module-version:$FullModuleVersion --module-name:$ModuleFullName --service-name:$Module --input-file:$OpenApiFile $AutoRestModuleConfig --max-cpu=2 --network-calls=2 --reset
9373
if ($LastExitCode -ne 0) {
9474
Write-Host -ForegroundColor Red "AutoREST failed to generate '$ModuleFullName' module."

0 commit comments

Comments
 (0)