Skip to content

Commit fb54370

Browse files
committed
Patch which appimagetool
1 parent b8c443b commit fb54370

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎python_appimage/commands/which.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ def _unpack_args(args):
1616
def execute(binary):
1717
'''Print the location of a binary dependency
1818
'''
19-
path = os.path.join(os.path.dirname(deps.PATCHELF), binary)
19+
if binary == 'appimagetool':
20+
path = deps.ensure_appimagetool(dry=True)
21+
else:
22+
path = os.path.join(os.path.dirname(deps.PATCHELF), binary)
2023
if os.path.exists(path):
2124
print(path)

‎python_appimage/utils/deps.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
PATCHELF = os.path.expanduser('~/.local/bin/patchelf')
3232
'''Location of the PatchELF binary'''
3333

34-
def ensure_appimagetool():
34+
def ensure_appimagetool(dry=False):
3535
'''Fetch appimagetool from the web if not available locally
3636
'''
3737

@@ -44,7 +44,7 @@ def ensure_appimagetool():
4444
appdir = os.path.join(APPIMAGETOOL_DIR, appdir_name)
4545
apprun = os.path.join(appdir, 'AppRun')
4646

47-
if os.path.exists(apprun):
47+
if dry or os.path.exists(apprun):
4848
return apprun
4949
appimage = 'appimagetool-{0:}.AppImage'.format(_ARCH)
5050

0 commit comments

Comments
 (0)