Skip to content

Commit

Permalink
fix: bypass distrobox upgrade sudo checks
Browse files Browse the repository at this point in the history
  • Loading branch information
gerblesh committed Sep 20, 2023
1 parent f67b894 commit 02f6253
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ublue_update/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,11 @@ def run_update_scripts(root_dir: str):
)
if out.returncode != 0:
log.error(
f"{full_path} returned error code: {out.returncode}",
out.stdout.decode("utf-8"),
f"""{full_path} returned error code: {out.returncode}
Program output:
{out.stdout.decode("utf-8")}
""",
)
notify(
"System Updater",
Expand All @@ -124,6 +127,7 @@ def run_updates(args):
filelock_path = "/run/ublue-update.lock"
if process_uid != 0:
xdg_runtime_dir = os.environ.get("XDG_RUNTIME_DIR")
print("")
if os.path.isdir(xdg_runtime_dir):
filelock_path = f"{xdg_runtime_dir}/ublue-update.lock"
fd = acquire_lock(filelock_path)
Expand Down

0 comments on commit 02f6253

Please sign in to comment.