probonopd / go-appimage

Go implementation of AppImage tools
MIT License
760 stars 73 forks source link

$PATH seemingly ignored #236

Closed parkerlreed closed 1 year ago

parkerlreed commented 1 year ago

/etc/profile contains

PATH+=":/home/deck/.local/bin/appimage"

This results in

/home/deck/.local/bin:/home/deck/.local/podman/bin:/opt/devkitpro/tools/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/deck/.local/bin/appimage

appimaged documentation says $PATH is considered but it never seems to get scanned

https://github.com/probonopd/go-appimage/blob/master/src/appimaged/README.md#notes

Dec 16 14:02:36 steamdeck appimaged-732-x86_64.AppImage[8416]: 2022/12/16 14:02:36 Registering AppImages in [/home/deck/Downloads /home/deck/Desktop /home/deck/.local/bin /home/deck/Applications /opt /usr/local/bin /efi/Applications /esp/Applications /root/Applications]

Full log

https://gist.github.com/parkerlreed/0fcbd7841cbc92f7a193f65d78febf61

parkerlreed commented 1 year ago

As a workaround I changed one of the search paths and manually compiled

https://github.com/probonopd/go-appimage/blob/master/src/appimaged/appimaged.go#L76

Doesn't seem to mention using PATH directories anywhere

probonopd commented 1 year ago

Indeed, seems like we need to append $PATH to https://github.com/probonopd/go-appimage/blob/master/src/appimaged/appimaged.go#L76.