jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
7.84k stars 188 forks source link

[Minor] Generate readme should not expand env variables paths #2178

Open carlotm opened 5 days ago

carlotm commented 5 days ago

What happened?

If you enable the postgresql plugin, it sets some environment variables.

When you generate the readme with devbox generate readme, those variables are expanded revealing the full path of the person who run the command.

For example, I could end up with this in the readme:

PGDATA="/home/carloratm/ooo/oha/.devbox/virtenv/postgresql/data"
PGHOST="/home/carloratm/ooo/oha/.devbox/virtenv/postgresql"

If it is possible, I would like to see

PGDATA: "{{ .Virtenv }}/data",
PGHOST: "{{ .Virtenv }}"

I am not entirely sure this is a nice solution, but the user absolute path doesn't look nice either.

Any thoughts?

Steps to reproduce

  1. Enable the postgresql plugin (or any other that sets env variables)
  2. Generate the readme with `devbox generate readme

Command

generate

devbox.json

No response

Devbox version

0.12.0

Nix version

No response

What system does this bug occur on?

Linux (x86-64)

Debug logs

No response