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

Add non_relocatable: key for the app stanza #14517

Closed
3 tasks done
thoran opened this issue Feb 6, 2023 · 6 comments
Closed
3 tasks done

Add non_relocatable: key for the app stanza #14517

thoran opened this issue Feb 6, 2023 · 6 comments
Labels
features New features help wanted We want help addressing this outdated PR was locked due to age

Comments

@thoran
Copy link

thoran commented Feb 6, 2023

brew doctor output

Your system is ready to brew.

Verification

  • My "brew doctor output" above says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update twice and am still able to reproduce my issue.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

brew config output

HOMEBREW_VERSION: 3.6.20-261-gb3a71ba
ORIGIN: https://github.com/Homebrew/brew
HEAD: b3a71ba7cdb7e005c26c86bcc627f0549dfe19d0
Last commit: 12 hours ago
Core tap origin: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 5cef4c42a3f0706102b7f58fa671c3167500ab06
Core tap last commit: 27 hours ago
Core tap branch: master
Core tap JSON: 06 Feb 04:21 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: ["--appdir=~/Applications", "--fontdir=/Library/Fonts"]
HOMEBREW_DISPLAY: localhost:0.0
HOMEBREW_EDITOR: /usr/bin/vi
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 14.0.0 build 1400
Git: 2.39.1 => /opt/homebrew/bin/git
Curl: 7.84.0 => /usr/bin/curl
macOS: 13.0-arm64
CLT: 14.2.0.0.1.1668646533
Xcode: 14.2
Rosetta 2: false

What were you trying to do (and why)?

I was trying to install Postgres.app.

What happened (include all command output)?

$ brew install postgres-unofficial
==> Downloading https://github.com/PostgresApp/PostgresApp/releases/download/v2.5.12/Postgres-2.5.12-10-11-12-13-14-15.dmg
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/3946572/9deef084-868f-439e-9741-db6d13212ec6?X-Amz-Algorithm=AWS4-HMAC-SHA256
######################################################################## 100.0%
==> Installing Cask postgres-unofficial
==> Moving App 'Postgres.app' to '/Users/thoran/Applications/Postgres.app'
🍺  postgres-unofficial was successfully installed!

When attempting to run it, I see a dialog with the following:
"Postgres.app can't be launched
Please move Postgres.app to your Applications folder.

  • use Finder to move the app
  • don't place it in a subfolder
  • don't change the app name

OK"

What did you expect to happen?

I would think that if an app refuses to run if not in /Applications (and there are others, megasync being another) that a formula should know this and allow for an automatic exception if a flag is set. I may refuse to allow for such an exception I suppose. If there is otherwise no necessity for apps to be installed in /Applications and it will refuse to run otherwise that's an app developer issue, but at least we should be able to manage as well as are able at the installer level. I believe that some apps really can't run unless in /Applications due to some constraint on certain kinds of apps imposed by Apple. The suggested flag is --app-dir-strict=false as the default. If I set it to --app-dir-strict=true, then it will refuse to install in /Applications and install as per --app-dir anyway or refuse to install anything, since there's no point I suppose.

Step-by-step reproduction instructions (by running brew commands)

See above...
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Feb 28, 2023
@gromgit
Copy link
Member

gromgit commented Feb 28, 2023

Sounds like a non_relocatable: key for the app stanza might be a good idea.

@github-actions github-actions bot removed the stale No recent activity label Feb 28, 2023
@MikeMcQuaid
Copy link
Member

Sounds like a non_relocatable: key for the app stanza might be a good idea.

@gromgit Agreed. @Homebrew/cask any thoughts?

@MikeMcQuaid MikeMcQuaid added features New features and removed bug Reproducible Homebrew/brew bug labels Feb 28, 2023
@miccal
Copy link
Member

miccal commented Feb 28, 2023

Sounds like a non_relocatable: key for the app stanza might be a good idea.

Excellent idea.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Mar 22, 2023
@MikeMcQuaid MikeMcQuaid added help wanted We want help addressing this and removed stale No recent activity labels Mar 22, 2023
@MikeMcQuaid MikeMcQuaid changed the title Optionally ignore --appdir in HOMEBREW_CASK_OPTS where a formula is known not to run unless in /Applications Add non_relocatable: key for the app stanza Mar 22, 2023
@MikeMcQuaid
Copy link
Member

Let's track this in Homebrew/homebrew-cask#12858 instead

@MikeMcQuaid MikeMcQuaid closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2023
@github-actions github-actions bot added the outdated PR was locked due to age label Nov 6, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
features New features help wanted We want help addressing this outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

5 participants
@thoran @MikeMcQuaid @gromgit @miccal and others