Skip to content

Added support for argument ALTERNATIVE_PATH - #38

Open
pmex wants to merge 5 commits into
erikstam:mainfrom
BonnierNews:add_support_for_ALTERNATE_PATH
Open

Added support for argument ALTERNATIVE_PATH#38
pmex wants to merge 5 commits into
erikstam:mainfrom
BonnierNews:add_support_for_ALTERNATE_PATH

Conversation

@pmex

@pmex pmex commented May 13, 2024

Copy link
Copy Markdown
Contributor

I realised that we're using alternative paths for some of our apps deployed using Installomator. Mainly to place them in a user writable director for non-admin users.
To be able to uninstall them, we therefore need to be able to change the app default path.
N.B. this is dependant on #24. Maybe time to do some merging of approved PR's?

@pmex pmex changed the title Added support for argument ALTERNATE_PATH Added support for argument ALTERNATIVE_PATH May 13, 2024
@pmex

pmex commented May 13, 2024

Copy link
Copy Markdown
Contributor Author

Also, the way the arguments are parsed (with eval), a path containing a space needs to be both quoted and have all spaces escaped.
i.e. ALTERNATIVE_PATH="/Applications/User\ Apps/MyApp.app"

@macbofh

macbofh commented Nov 3, 2024

Copy link
Copy Markdown
Collaborator

Sorry for the delayed response, but as you can see, we’ve brought the project out of hibernation.
How foolproof is this argument? Can an admin make a huge mistake if an incorrect path is used because he made an error with unescaped spaces, leading/trailing spaces or maybe a using a wildcard? I am a littlebit cautious putting to much flexibility in uninstaller that may remove user data.

@pmex

pmex commented Nov 4, 2024

Copy link
Copy Markdown
Contributor Author

You're right. This opens up for mistakes.
What if I change it so that the app name can't be changed (last part of the path can't be changed)?
i.e. ALTERNATIVE_PATH="/Applications/User\ Apps/MyApp.app" will work for appFiles[1]="/Applications/MyApp.app", but not for appFiles[1]="/Applications/MyOtherApp.app"?

@macbofh

macbofh commented Jan 3, 2025

Copy link
Copy Markdown
Collaborator

We are still discussing what should be the core functionality of the script and what can be excluded for rare cases. Admins can always create custom labels for their specific environments and custom paths.

@macbofh

macbofh commented May 1, 2026

Copy link
Copy Markdown
Collaborator

Could valuesfromarguments be an alternative to alternate_path? #74

@pmex

pmex commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

I tested this by

  1. installing citrixworkspace
  2. Moving Citrix Workspace.app to /Applications/TEST/
  3. Run uninstaller.app citrixworkspace appFiles+="(\"/Applications/TEST/Citrix Workspace.app\")"
    It still removes /Applications/Citrix Workspace.app if it also exists, but that might be ok for most installs?

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.

2 participants