Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

add flag for custom app path #48

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

willemml
Copy link
Contributor

@willemml willemml commented Jan 4, 2023

I wanted to use this while having nix home-manager manager my Spotify install, this means that Spotify is not installed in the usual location.

This PR simply adds a flag -a that allows a user to specify the path of the Spotify app.

Copy link
Owner

@Nuzair46 Nuzair46 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@willemml

  • Also add instructions for this change in the readme.
  • Handle the same case for uninstallation

@Nuzair46 Nuzair46 added the enhancement New feature or request label Jan 5, 2023
@jetfir3
Copy link
Contributor

jetfir3 commented Jan 5, 2023

@willemml
we have this option in the Linux version -- I would prefer the flags to match in both repos.
An uppercase -P flag is used to set PATH. Keeping lowercase -a open for potential future features is ideal.
https://github.com/SpotX-CLI/SpotX-Linux/blob/main/install.sh#L25

getopts options and PATH_FLAG var should be inserted in alphabetical order.

readme instructions could be: -P Path to Spotify.app -- set custom Spotify app path

otherwise.. implementation itself looks great and thanks for contributing!

@willemml
Copy link
Contributor Author

willemml commented Jan 5, 2023

Thanks for the feedback! I'm working on the implementation for the uninstall script, should I add a flag getopt loop to it as well?

@jetfir3
Copy link
Contributor

jetfir3 commented Jan 5, 2023

should I add a flag getopt loop to it as well?

Would this be to loop around instead of exiting if unknown/incorrect flag is used.. or?

@willemml
Copy link
Contributor Author

willemml commented Jan 5, 2023

I just looked at the Linux uninstall script and it would be exactly the same thing (looping through each flag).

@jetfir3
Copy link
Contributor

jetfir3 commented Jan 5, 2023

I just looked at the Linux uninstall script and it would be exactly the same thing (looping through each flag).

Ahh, for the uninstall script... I misunderstood. Yes, that'd be perfect.

@willemml willemml force-pushed the feature/app-path-flag branch from 03ea3aa to 985d215 Compare January 5, 2023 16:53
@willemml willemml requested a review from Nuzair46 January 5, 2023 17:07
Copy link
Owner

@Nuzair46 Nuzair46 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the contribution.

@jetfir3 please verify and merge.

@jetfir3
Copy link
Contributor

jetfir3 commented Jan 6, 2023

Looks good.

@jetfir3 jetfir3 merged commit fbaf406 into Nuzair46:main Jan 6, 2023
Nuzair46 pushed a commit that referenced this pull request Feb 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants