Closed Cobraeti closed 6 months ago
It's better to use filepath.Join
instead of string concatenation to make sure there aren't any double slashes.
I'm out this afternoon, I will try to make this rework tomorrow, thanks for the head-up 😉
Hi @CalebQ42, I just pushed the rework and also added surrounding quotes in case os.UserHomeDir
could contain spaces (even if I hope this won't happen anywhere 😅)
I will check why the pipeline failed, but that might take a while, as I don't have a Go environnement setup ATM 😅
After reading the pipeline error a few more times I think I figured the error => I passed the already concacenated string instead of a list of strings... I hope that's enough to build, else I will really need to setup this Go environnement and check all build steps on my side to avoid bothering you 😅
I've been a bit busy so I didn't catch it initially, but os.UserHomeDir()
returns two values so you can't inline it. Instead you'll need to set the values to a variable before you can use it.
Hi @CalebQ42, I took the time to setup GoLand and it helped me even notice that a variable home
catching the good part of os.UserHomeDir()
was already defined in the main package:
https://github.com/probonopd/go-appimage/blob/09fd0186774aefa2351c42b4bb22f92ce0c4f235/src/appimaged/appimaged.go#L76
I'm not sure if it's a good practice though, but I was able to compile and push it on my target system to confirm the error is now gone...
Just in case, as I was not able to replicate the exact context of the Github Workflow to build:
./scripts/build.sh -a amd64,386,arm64,arm appimaged
(I was not able to build the full project)Thank you very much @Cobraeti
This change should fix #273