Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(appimaged): avoid 'Invalid desktop file' error on Debian #274

Merged
merged 4 commits into from
Mar 25, 2024
Merged

fix(appimaged): avoid 'Invalid desktop file' error on Debian #274

merged 4 commits into from
Mar 25, 2024

Conversation

Cobraeti
Copy link
Contributor

This change should fix #273

@CalebQ42
Copy link
Contributor

It's better to use filepath.Join instead of string concatenation to make sure there aren't any double slashes.

@Cobraeti
Copy link
Contributor Author

I'm out this afternoon, I will try to make this rework tomorrow, thanks for the head-up 😉

@Cobraeti
Copy link
Contributor Author

Cobraeti commented Mar 17, 2024

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 😅)

@Cobraeti
Copy link
Contributor Author

I will check why the pipeline failed, but that might take a while, as I don't have a Go environnement setup ATM 😅

@Cobraeti
Copy link
Contributor Author

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 😅

@CalebQ42
Copy link
Contributor

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.

@Cobraeti
Copy link
Contributor Author

Cobraeti commented Mar 20, 2024

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:

var home, _ = os.UserHomeDir()

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:

  • Build system: Ubuntu 22.04.1 (running through WSL2) + go version go1.18.1 linux/amd64
  • Build command: ./scripts/build.sh -a amd64,386,arm64,arm appimaged (I was not able to build the full project)

@probonopd
Copy link
Owner

Thank you very much @Cobraeti

@probonopd probonopd merged commit fa63181 into probonopd:master Mar 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'Invalid desktop file' with exit status 1 on Debian
3 participants