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

Global commands sometimes don't run with envvars configured (auto-shimming insufficient) #5

Open
untitaker opened this issue Jul 23, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@untitaker
Copy link
Owner

If an envrc exports environment variables that do not add or shadow existing commands, but are rather meant to mutate behavior of existing global commands, quickenv will not export those environment variables correctly.

An example of this is sentry's crash-reporting. sentry installs sentry-cli globally (using its own installer), and then exports a SENTRY_DSN environment variable that configures sentry-cli to report crashes to a particular server:

curl ... | sh # install sentry-cli in global PATH
export SENTRY_DSN=...  # configure sentry-cli to report errors

Since sentry-cli is not exposed via a new PATH entry, quickenv will not shim it automatically, and as such sentry-cli will not run with SENTRY_DSN in its envvars.

There are multiple workarounds:

  • Use quickenv vars or quickenv exec explicitly.
  • Run quickenv shim sentry-cli.
  • Change the .envrc to install sentry-cli into a new directory, and add a new PATH entry that contains the new binary.
@untitaker untitaker added the bug Something isn't working label Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant