Skip to content

Require users to load GDK env

Kassio Borges requested to merge kassio/inject-env-file-on-demand into main

What does this Merge Request do?

Instead of injecting ENV vars in the user shell file, I propose GDK to require the users to load GDK ENV file.

** Pros

  • Another, possible, advantage is that when GDK changes the values of the required ENV vars, or start to require new ones, the user won't have any changes on their dotfiles.
  • Less intrusive: IMHO this is less intrusive mainly to users, like myself, that keep their dotfiles (zshrc, bashrc, etc) in a git repository. Requiring the user to load a file gives to the user the power to decide where/when to load the file.
  • Consistency, other well known tools, like asdf/rvm/etc, already follow this pattern (require the user to source a file to prepare the shell with ENV vars, autocomplete, etc).

** Cons

  • It's kind of a painful change, since all the users already have the required ENV vars in their dotfiles, but I believe with the notification and right communication in the Slack channels this would be manageable.

Related to: #1133 (closed)

Merge Request checklist

  • Tests added for new functionality. If not, please raise Issue to follow-up.
  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Documentation added/updated, if needed.
  • gdk doctor test added, if needed.
Edited by Ash McKenzie

Merge request reports

Loading