File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed
Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff 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."
You can’t perform that action at this time.
0 commit comments