powershell: fix crash on sudo pwsh while within PowerShell

fix NixOS/nixpkgs#510681
This commit is contained in:
helpimnotdrowning
2026-04-25 23:52:03 -05:00
parent def188bbbd
commit 1eae57a7fb
+2 -1
View File
@@ -74,11 +74,12 @@ stdenv.mkDerivation rec {
mkdir -p $out/{bin,share/powershell}
cp -R * $out/share/powershell
chmod +x $out/share/powershell/pwsh
makeWrapper $out/share/powershell/pwsh $out/bin/pwsh \
wrapProgram $out/share/powershell/pwsh \
--prefix ${platformLdLibraryPath} : "${lib.makeLibraryPath buildInputs}" \
--set TERM xterm \
--set POWERSHELL_TELEMETRY_OPTOUT 1 \
--set DOTNET_CLI_TELEMETRY_OPTOUT 1
cp $out/share/powershell/pwsh $out/bin/pwsh
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''