diff --git a/perl.json b/perl.json index d2eaa78ba4..a1ed7038ab 100644 --- a/perl.json +++ b/perl.json @@ -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",