File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -59,15 +59,20 @@ elif [ $HOST_OS = 'Linux' ] ; then
59
59
if command -v dpkg > /dev/null; then # Linux distro: deb (ubuntu)
60
60
sudo_cmd=$( which sudo)
61
61
$sudo_cmd apt update
62
- $sudo_cmd apt install curl
62
+ $sudo_cmd apt --fix-broken install
63
63
check_pwsh $pwsh_min_ver $preferred_ver
64
- pwsh_pkg=" powershell_$pwsh_ver -1.deb_amd64.deb"
65
- pwsh_pkg_out=" $cacheDir /$pwsh_pkg "
66
- if [ ! -f " $pwsh_pkg_out " ] ; then
67
- curl -L " https://github.com/PowerShell/PowerShell/releases/download/v$pwsh_ver /$pwsh_pkg " -o " $pwsh_pkg_out "
64
+ if uname -a | grep -q " Ubuntu" ; then
65
+ $sudo_cmd snap install powershell --classic
66
+ else
67
+ $sudo_cmd apt install curl
68
+ pwsh_pkg=" powershell_$pwsh_ver -1.deb_amd64.deb"
69
+ pwsh_pkg_out=" $cacheDir /$pwsh_pkg "
70
+ if [ ! -f " $pwsh_pkg_out " ] ; then
71
+ curl -L " https://github.com/PowerShell/PowerShell/releases/download/v$pwsh_ver /$pwsh_pkg " -o " $pwsh_pkg_out "
72
+ fi
73
+ $sudo_cmd dpkg -i --ignore-depends=libicu72 " $pwsh_pkg_out "
74
+ $sudo_cmd apt install -f powershell
68
75
fi
69
- $sudo_cmd dpkg -i --ignore-depends=libicu72 " $pwsh_pkg_out "
70
- $sudo_cmd apt-get install -f powershell
71
76
elif command -v pacman > /dev/null; then # Linux distro: Arch
72
77
# refer: https://ephos.github.io/posts/2018-9-17-Pwsh-ArchLinux
73
78
# available pwsh version, refer to: https://aur.archlinux.org/packages/powershell-bin
You can’t perform that action at this time.
0 commit comments