File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ sudo add-apt-repository --yes universe
22
22
if apt-cache policy powershell | grep -q " Candidate:" ; then
23
23
echo " PowerShell is available in the repository. Installing..."
24
24
# Install PowerShell from the repository
25
+ echo " ================= Wait for dpkg to release lock ================="
26
+ while fuser /var/lib/dpkg/lock-frontend > /dev/null 2>&1 ; do
27
+ echo " Waiting for other software managers to finish..."
28
+ sleep 5
29
+ done
25
30
sudo apt-get install -y powershell
26
31
else
27
32
echo " PowerShell is not available in the repository. Falling back to manual installation..."
73
78
echo " Installing PowerShell package..."
74
79
sudo dpkg -i " $tmpDir /powershell.deb"
75
80
81
+ # Install PowerShell from the repository
82
+ echo " ================= Wait for dpkg to release lock ================="
83
+ while fuser /var/lib/dpkg/lock-frontend > /dev/null 2>&1 ; do
84
+ echo " Waiting for other software managers to finish..."
85
+ sleep 5
86
+ done
87
+
76
88
# Resolve missing dependencies and finish the install (if necessary)
77
89
echo " Resolving missing dependencies..."
78
90
sudo apt-get install -f
You can’t perform that action at this time.
0 commit comments