Fix ubuntu 24.04 pwsh setup [skip ci]

This commit is contained in:
halx99 2024-10-21 23:23:55 +08:00 committed by GitHub
parent 5d9b18de0d
commit dd3207b7b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ mkdir -p $cacheDir
pwsh_ver=$1
if [ "$pwsh_ver" = "" ] ; then
pwsh_ver='7.4.4'
pwsh_ver='7.4.5'
fi
pwsh_min_ver=$2
@ -64,8 +64,8 @@ elif [ $HOST_OS = 'Linux' ] ; then
curl -L "https://github.com/PowerShell/PowerShell/releases/download/v$pwsh_ver/$pwsh_pkg" -o "$pwsh_pkg_out"
fi
sudo_cmd=$(which sudo)
$sudo_cmd dpkg -i "$pwsh_pkg_out"
$sudo_cmd apt-get install -f
$sudo_cmd dpkg -i --ignore-depends=libicu72 "$pwsh_pkg_out"
$sudo_cmd apt-get install -f powershell
elif command -v pacman > /dev/null; then # Linux distro: Arch
# refer: https://ephos.github.io/posts/2018-9-17-Pwsh-ArchLinux
# available pwsh version, refer to: https://aur.archlinux.org/packages/powershell-bin