Merge pull request #15 from ZStrikeGit/main

Add legible error message for missing setup file
This commit is contained in:
orbittwz
2025-09-23 14:20:10 +03:00
committed by GitHub

View File

@@ -59,18 +59,23 @@ session = requests.sessions.Session()
def setup_version():
jsonFromPowerShell = subprocess.run(
[
"powershell.exe",
"(Get-Item '"
+ ADOBE_SETUP_BIN
+ "').VersionInfo.FileVersion | ConvertTo-Json",
],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
shell=True,
).stdout
return json.loads(jsonFromPowerShell)
try:
jsonFromPowerShell = json.loads(subprocess.run(
[
"powershell.exe",
"(Get-Item '"
+ ADOBE_SETUP_BIN
+ "').VersionInfo.FileVersion | ConvertTo-Json",
],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
shell=True,
).stdout)
return jsonFromPowerShell
except Exception as e:
sys.stderr.write("Set-up.exe not found! Please extract Set-up.exe from one of the archives, and place it in this directory.")
sys.exit(1)
def os_data():