Skip to content

Commit

Permalink
fix choco update
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrlaczykowski committed Jun 7, 2024
1 parent c53e59b commit 85254e1
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,14 @@ def winget_upgrade():
print(f"Error upgrading packages with winget: {e}")

def choco_upgrade():
try:
print("Checking for Choco updates...")
subprocess.run(["choco", "upgrade", "all", "-y"], check=True)
print("All Chocolatey packages upgraded successfully.")
except subprocess.CalledProcessError as e:
print(f"Error upgrading Chocolatey packages: {e}")
if not is_choco_installed():
print("Chocolatey (choco) is not installed. Installing it now...")
install_choco()
try:
subprocess.run(["choco", "upgrade", "all", "-y"], check=True)
print("All Chocolatey packages upgraded successfully.")
except subprocess.CalledProcessError as e:
print(f"Error upgrading Chocolatey packages: {e}")
if not is_choco_installed():
print("Chocolatey (choco) is not installed. Installing it now...")
install_choco()
try:
subprocess.run(["choco", "upgrade", "all", "-y"], check=True)
print("All Chocolatey packages upgraded successfully.")
except subprocess.CalledProcessError as e:
print(f"Error upgrading Chocolatey packages: {e}")

def windows_update():
try:
Expand Down

0 comments on commit 85254e1

Please sign in to comment.