Skip to content

Commit

Permalink
Merge pull request #113 from jessebot/108-fix-gaming-snap-packages-fa…
Browse files Browse the repository at this point in the history
…il-to-install-with-keyerror-update-on-linux

changing how and when we check if we need to run gaming commands
  • Loading branch information
cloudymax authored Dec 3, 2022
2 parents 4e1325d + 836522e commit de8ff20
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions onboardme/pkg_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ def run_preinstall_cmds(cmd_list=[], pkg_groups=[]):
if second list of package groups contains gaming, runs additional commands
returns True
"""
if 'gaming' in pkg_groups and 'apt' in cmd_list['update']:
log.debug("Run gaming specific commands to update /etc/apt/sources")
cmds = ["sudo dpkg --add-architecture i386",
f"sudo {PWD}/scripts/update_apt_sources.sh"]
subproc(cmds, spinner=False)
run_gaming_setup = False
if 'gaming' in pkg_groups:
run_gaming_setup = True

for pre_cmd in ['setup', 'update', 'upgrade']:
if pre_cmd in cmd_list:
if pre_cmd == 'update' and 'apt' in pre_cmd:
log.debug("Run gaming specific commands to update /etc/apt/sources")
cmds = ["sudo dpkg --add-architecture i386",
f"sudo {PWD}/scripts/update_apt_sources.sh"]
subproc(cmds, spinner=False)

SPINNER = True
if 'sudo' in cmd_list[pre_cmd]:
SPINNER = False
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "onboardme"
version = "0.15.10"
description = "An onboarding tool to install dot files and packages including a default mode with sensible defaults to run on most Debian/macOS machines."
version = "0.15.11"
description = "An onboarding tool to install dot files and packages including a default mode with sensible defaults to run on most computers running Debian based distros or macOS."
authors = ["Jesse Hitch <jessebot@linux.com>"]
license = "AGPL-3.0-or-later"
readme = "README.md"
Expand Down

0 comments on commit de8ff20

Please sign in to comment.