Skip to content

Commit

Permalink
fix merge mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
PartyWumpus committed Feb 4, 2024
1 parent bce5521 commit c6e9ad0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/src/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,17 @@ async def download_decky_binary(self, download_url, version, is_zip = False):
remove(path.join(getcwd(), download_filename))
shutil.move(path.join(getcwd(), download_temp_filename), path.join(getcwd(), download_filename))
chmod(path.join(getcwd(), download_filename), 777, False)
if get_selinux():
from asyncio.subprocess import create_subprocess_exec
process = await create_subprocess_exec("chcon", "-t", "bin_t", path.join(getcwd(), download_filename))
logger.info(f"Setting the executable flag with chcon returned {await process.wait()}")

logger.info("Updated loader installation.")
await tab.evaluate_js("window.DeckyUpdater.finish()", False, False)
await self.do_restart()
await tab.close_websocket()

async def do_update(self):
download_filename = "PluginLoader" if ON_LINUX else "PluginLoader.exe"
logger.debug("Starting update.")
try:
assert self.remoteVer
Expand All @@ -206,6 +209,7 @@ async def do_update(self):

version = self.remoteVer["tag_name"]
download_url = None
download_filename = "PluginLoader" if ON_LINUX else "PluginLoader.exe"

for x in self.remoteVer["assets"]:
if x["name"] == download_filename:
Expand Down

0 comments on commit c6e9ad0

Please sign in to comment.