Closed nasava closed 2 years ago
This is actually an issue for each VCS.
If you use diffuse file1 file2
it works, but in your case it will call the VCS binary to get the commited contents.
The issue here is that Flatpak apps are jailed and can't run host's binaries.. I'm trying to find a solution, but it's a bit of a pickle :disappointed:
Wow you fixed it really fast :) thanks.
I tested it with the 0.7.1 flatpack version, it worked well after I found out how to run it properly. (Symlinking to the diffuse binary did not work anymore, maybe because of the diffuse 0.4.8 installed by apt/dpkg)
I created a script for me to make "diffuse" available on the PATH:
#!/bin/bash
# script to run diffuse's flatpak version
# it wraps non-flag arguments by @@ to apply flatpak's file-forwarding
PARAMS=()
for PAR in "$@"; do
if [[ "$PAR" = "-"* ]]; then
PARAMS+=("$PAR")
else
PARAMS+=("@@" "$PAR" "@@")
fi
done
set -ex
exec /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=diffuse --file-forwarding io.github.mightycreak.Diffuse "${PARAMS[@]}"
Is this the right way to do this?
Creating a script to wrap the flatpak call is the right approach, but maybe you can do something a bit simpler.
Have you tried this?
#!/bin/sh
flatpak run --branch=stable io.github.mightycreak.Diffuse $@
Edit: It apparently does not work.. I'm searching for an easier solution.. brb Edit 2: It's ok, it works as expected
Ok, well, it does work, I just messed up the argument order in my script :sweat_smile:
There is another solution that might be a bit easier:
ln -s /var/lib/flatpak/exports/bin/io.github.mightycreak.Diffuse /path/to/destination/diffuse
If you want it just for yourself, you can put ~/.local/bin/diffuse
But you can also set it for all the users and put it here /usr/local/bin/diffuse
(so you won't override the diffuse
binary installed through your package system)
Hi, thank you for reviving this awesome tool!
I tried out the flatpak version (0.6) but it does not seem to be able to retrieve the SVN HEAD revision of a file to compare against. I was using:
For the moment I went back to the version packaged in debian 0.4.8 as this is something I use diffuse the most, but I would be happy to help fixing this by providing information if you need.