spicetify / cli

Command-line tool to customize Spotify client. Supports Windows, MacOS, and Linux.
https://spicetify.app
GNU Lesser General Public License v2.1
18.82k stars 735 forks source link

FindAppPath doesn't work for Mac user installation #3230

Closed ChananM closed 1 day ago

ChananM commented 1 day ago

🔍 Have you checked Spicetify.app page for your issue?

🔍 Is there already an issue for your problem?

ℹ Environment / Computer Info

- Spotify version: 1.2.51.345.gcc39d911 (MacOS Apple Silicon)
- Spicetify version: 2.38.5
- OS: MacOS 14.7.1

📝 Description

Hi, Every time there's an update to Spotify and Spicetify breaks, I run spicetify update, assuming there's an update that supports the new version. Usually there is, but the update process stops with a failure to open the Apps directory inside Spotify application contents (see screenshot). The update process itself is successful, but the post update process to run backup apply fails. I looked at the code and it seems this is caused by utils.FindAppPath() looking for Spotify in the Applications folder in my Mac, but I have Spotify installed in my user's Applications folder (I.E, ~/Applications). This is because it's my company's machine and I don't have admin privileges by default (see second screenshot). I can see that for Windows and Linux the lookup for the application is smarter, can do the same for Mac please?

📸 Screenshots

image

image

rxri commented 1 day ago

That's not spicetify's fault. Your Spotify app doesn't have it. Reinstall

rxri commented 1 day ago

the line you have shown, is only executed when there's no config. so since no config has been detected, it tried to create one, with the default path. something is wrong on your end and not ours because it clearly shows error about Apps folder, check your spotify_path because it just may be wrong

ChananM commented 1 day ago

@rxri Thank you for your response (and generally for Spicetify, which is incredible!) I checked my configuration and it points to the correct place: /Users/<username>/Applications/Spotify.app/Contents/Resources. I even verified it can be opened via terminal. I might have read the code wrong, but it seems to me utils.FindAppPath() is triggered in the main function without checking the config if I run spicetify update. I don't enter any of the options of the if or switch statements that precede it (config-dir, config, color, spotify-updates, path, watch), and I do enter the slices.Contains(commands, "update") condition.

image

As for not supporting user installation, do you accept contributions? I might try my hand at this if I can

rxri commented 1 day ago

fixed with https://github.com/spicetify/cli/commit/cf47f29268a97377a2a6ef280c34b013fa7d54ba