mirror of
				https://github.com/shivammathur/setup-php.git
				synced 2025-10-31 15:26:23 +07:00 
			
		
		
		
	Perform only one URL call to download latest PhpManager.zip asset
This commit is contained in:
		 Michele Locati
					Michele Locati
				
			
				
					committed by
					
						 Shivam Mathur
						Shivam Mathur
					
				
			
			
				
	
			
			
			 Shivam Mathur
						Shivam Mathur
					
				
			
						parent
						
							1c6058bc18
						
					
				
				
					commit
					12b1061a6b
				
			| @ -59,9 +59,8 @@ Function Add-Printf { | ||||
| Function Install-PhpManager() { | ||||
|   $module_path = "$php_dir\PhpManager\PhpManager.psm1" | ||||
|   if(-not (Test-Path $module_path -PathType Leaf)) { | ||||
|     $release = Invoke-RestMethod https://api.github.com/repos/mlocati/powershell-phpmanager/releases/latest | ||||
|     $zip_file = "$php_dir\PhpManager.zip" | ||||
|     Invoke-WebRequest -UseBasicParsing -Uri $release.assets[0].browser_download_url -OutFile $zip_file | ||||
|     Invoke-WebRequest -UseBasicParsing -Uri 'https://github.com/mlocati/powershell-phpmanager/releases/latest/download/PhpManager.zip' -OutFile $zip_file | ||||
|     Expand-Archive -Path $zip_file -DestinationPath $php_dir -Force | ||||
|   } | ||||
|   Import-Module $module_path | ||||
|  | ||||
		Reference in New Issue
	
	Block a user