mas icon indicating copy to clipboard operation
mas copied to clipboard

Support installation to subdirectories of `/Applications`

Open atommclain opened this issue 4 years ago • 9 comments

Is your feature request related to a problem? Please describe. Describe the solution you'd like It would be nice to support downloading apps to a custom path. Eg mas install 414568915 --path /Applications/Utilities

Describe alternatives you've considered I use a Brewfile with brew bundle to run mas, an alternative would be to create a script to manually move the applications to their desired location after calling brew bundle.

cd /Applications
mkdir -p /Applications/Utilities
mv Bakery.app /Applications/Utilities

Additional context Based on https://github.com/mas-cli/mas/issues/72 and https://github.com/mas-cli/mas/pull/376 I gather that supporting installation outside of the /Applications directory is not supported, but a subdirectory seems to work. If I install an app, then move it to a subdirectory of /Applications', it will still appear in mas list`.

atommclain avatar Jan 21 '22 20:01 atommclain

This is an interesting use case @atommclain. The Mac App Store doesn't support this, but apps can certainly be moved after installation.

Since you follow this practice, how has the Mac App Store treated these relocated apps? Do they get updated correctly? Are the updates installed to the same location, or do they get moved back up to /Applications?

In order for mas to support this, the install command would need support for an optional install path. Also, brew bundle would need the Brewfile syntax to support this optional path as well.

phatblat avatar Jan 26 '22 17:01 phatblat

Since you follow this practice, how has the Mac App Store treated these relocated apps? Do they get updated correctly? Are the updates installed to the same location, or do they get moved back up to /Applications?

I will verify and report back, but I've never had issues updating or applications getting moved up to this point.

In order for mas to support this, the install command would need support for an optional install path. Also, brew bundle would need the Brewfile syntax to support this optional path as well.

Perhaps I am misreading/misunderstanding, but I do believe that there is already support in the Brewfile syntax for passing in custom args. See example: cask "firefox", args: { appdir: "~/my-apps/Applications" } in https://github.com/Homebrew/homebrew-bundle. So perhaps it would just require updating the install command of mas?

atommclain avatar Jan 31 '22 16:01 atommclain

Ah! I didn't realize that brew bundle supported this appdir argument. In that light, yes, only the mas install command would need similar support.

phatblat avatar Feb 01 '22 23:02 phatblat

Just an update on this issue regarding:

Since you follow this practice, how has the Mac App Store treated these relocated apps? Do they get updated correctly? Are the updates installed to the same location, or do they get moved back up to /Applications?

I moved an application to a sub folder of /Applications/test and updated via mas-cli, the app was updated without issue.

atommclain avatar Jul 12 '22 15:07 atommclain