mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 21:11:58 +00:00
fix: adtl remote binary error handling
(cherry picked from commit 860b1ac835)
This commit is contained in:
committed by
TrainDoctor
parent
0c727d64d2
commit
310dd700ac
@@ -75,6 +75,8 @@ class PluginBrowser:
|
|||||||
packageJsonPath = path.join(pluginBasePath, 'package.json')
|
packageJsonPath = path.join(pluginBasePath, 'package.json')
|
||||||
pluginBinPath = path.join(pluginBasePath, 'bin')
|
pluginBinPath = path.join(pluginBasePath, 'bin')
|
||||||
|
|
||||||
|
logger.debug(f"Checking package.json at {packageJsonPath}")
|
||||||
|
|
||||||
if access(packageJsonPath, R_OK):
|
if access(packageJsonPath, R_OK):
|
||||||
with open(packageJsonPath, "r", encoding="utf-8") as f:
|
with open(packageJsonPath, "r", encoding="utf-8") as f:
|
||||||
packageJson = json.load(f)
|
packageJson = json.load(f)
|
||||||
@@ -83,6 +85,7 @@ class PluginBrowser:
|
|||||||
chmod(pluginBasePath, 777)
|
chmod(pluginBasePath, 777)
|
||||||
if access(pluginBasePath, W_OK):
|
if access(pluginBasePath, W_OK):
|
||||||
if not path.exists(pluginBinPath):
|
if not path.exists(pluginBinPath):
|
||||||
|
logger.debug(f"Creating bin directory at {pluginBinPath}")
|
||||||
mkdir(pluginBinPath)
|
mkdir(pluginBinPath)
|
||||||
if not access(pluginBinPath, W_OK):
|
if not access(pluginBinPath, W_OK):
|
||||||
chmod(pluginBinPath, 777)
|
chmod(pluginBinPath, 777)
|
||||||
@@ -93,6 +96,7 @@ class PluginBrowser:
|
|||||||
binName = remoteBinary["name"]
|
binName = remoteBinary["name"]
|
||||||
binURL = remoteBinary["url"]
|
binURL = remoteBinary["url"]
|
||||||
binHash = remoteBinary["sha256hash"]
|
binHash = remoteBinary["sha256hash"]
|
||||||
|
logger.debug(f"Attempting to download {binName} from {binURL}")
|
||||||
if not await download_remote_binary_to_path(binURL, binHash, path.join(pluginBinPath, binName)):
|
if not await download_remote_binary_to_path(binURL, binHash, path.join(pluginBinPath, binName)):
|
||||||
rv = False
|
rv = False
|
||||||
raise Exception(f"Error Downloading Remote Binary {binName}@{binURL} with hash {binHash} to {path.join(pluginBinPath, binName)}")
|
raise Exception(f"Error Downloading Remote Binary {binName}@{binURL} with hash {binHash} to {path.join(pluginBinPath, binName)}")
|
||||||
|
|||||||
Reference in New Issue
Block a user