AppImageCrafters / appimage-builder

GNU/Linux packaging solution using the AppImage format
MIT License
315 stars 58 forks source link

wrong shebang line reader: Required interpreter '-S' could not be found in the AppDir #250

Open cbm755 opened 2 years ago

cbm755 commented 2 years ago

I get these kinds of warnings:

INFO:root:Overriding runtime environment PYTHONHOME
WARNING:root:Required interpreter 'bash' could not be found in the AppDir while processing /app/AppDir/usr/lib/python3.8/site-packages/tqdm/completion.sh
WARNING:root:Required interpreter 'bash' could not be found in the AppDir while processing /app/AppDir/usr/bin/cautious-launcher
WARNING:root:Required interpreter 'sh' could not be found in the AppDir while processing /app/AppDir/usr/share/python3/runtime.d/public_modules.rtremove
WARNING:root:Required interpreter 'sh' could not be found in the AppDir while processing /app/AppDir/usr/share/python3/runtime.d/public_modules.rtinstall
WARNING:root:Required interpreter '-S' could not be found in the AppDir while processing /app/AppDir/usr/share/plom/contrib/plom-push-to-canvas.py
INFO:root:Downloading: https://github.com/AppImageCrafters/AppRun/releases/download/v2.0.0/libapprun_hooks-Release-x86_64.so

Generally those are not my shell scripts so I'm not worried about fixing those bash/sh WARNINGS.

But that last one about plom-push-to-canvas.py is my code. I flag it here b/c the error message is unclear. The relevant shebang line is:

#!/usr/bin/env -S python3 -u

It seems to me that whatever tool (maybe not even part of appimage-builder) is complaining about "Required interpreter" is looking for whatever is after env and doing some incorrect whitespace splitting.

azubieta commented 2 years ago

This is an appimage-builder error while trying to patch the shebang.

To workaround the issue you can edit your scripts shebang removing the -S argument or just changing it to #! /usr/bin/python3 -u.