mirror of
				https://github.com/ScoopInstaller/Main.git
				synced 2025-11-04 07:41:20 +00:00 
			
		
		
		
	perl: Use [System.IO.File]::WriteAllBytes() instead of Set-Content -Encoding Byte to fix compatibility issue with PowerShell 6 which has removed -Encoding Byte in favor of a new -AsByteStream switch. (#2352)
				
					
				
			This commit is contained in:
		
							parent
							
								
									0f0992994b
								
							
						
					
					
						commit
						b602b6a9cd
					
				@ -16,7 +16,7 @@
 | 
			
		||||
        "# enable standard idiomatic access to user's home directory",
 | 
			
		||||
        "## remove HomeDir section from portable.perl (disables Portable.pm override of File::HomeDir)",
 | 
			
		||||
        "## NOTE: conversion to byte[] avoids adding an extra trailing newline to the output file",
 | 
			
		||||
        "[byte[]][char[]]((Get-Content -raw \"$dir\\portable.perl\") -replace \"(?ms)^HomeDir:.*?^(?=\\S)\",\"\") | Set-Content \"$dir\\portable.perl\" -encoding byte"
 | 
			
		||||
        "[System.IO.File]::WriteAllBytes(\"$dir\\portable.perl\", ([byte[]][char[]]((Get-Content -Raw \"$dir\\portable.perl\") -replace \"(?ms)^HomeDir:.*?^(?=\\S)\",\"\")))"
 | 
			
		||||
    ],
 | 
			
		||||
    "env_add_path": [
 | 
			
		||||
        "perl\\site\\bin",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user